Desskripsi:
- new page: other-report-commentar, other-report-posting, report-commentar, report-posting

# No Issue
This commit is contained in:
2025-07-15 11:24:57 +08:00
parent cce27c26f6
commit a0dad5618a
11 changed files with 308 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
import {
BaseBox,
Grid,
AvatarCustom,
TextCustom,
BaseBox,
ClickableCustom,
Grid,
Spacing,
TextCustom,
} from "@/components";
import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
@@ -14,11 +14,9 @@ import { View } from "react-native";
export default function Forum_CommentarBoxSection({
data,
setOpenDrawer,
setStatus,
}: {
data: any;
setOpenDrawer: (value: boolean) => void;
setStatus: (value: string) => void;
}) {
return (
<>
@@ -46,7 +44,6 @@ export default function Forum_CommentarBoxSection({
<ClickableCustom
onPress={() => {
setOpenDrawer(true);
setStatus(data.status);
}}
style={{
alignItems: "flex-end",

View File

@@ -2,7 +2,7 @@ import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
import { Feather, Ionicons } from "@expo/vector-icons";
export { drawerItemsForumBeranda };
export { drawerItemsForumBeranda, drawerItemsForumComentar };
const drawerItemsForumBeranda = ({
id,
@@ -11,6 +11,15 @@ const drawerItemsForumBeranda = ({
id: string;
status: string;
}) => [
{
icon: (
<Ionicons name="flag" size={ICON_SIZE_SMALL} color={MainColor.white} />
),
label: "Laporkan diskusi",
// color: MainColor.white,
path: `/forum/${id}/report-posting`,
},
{
icon: (
<Feather name="edit" size={ICON_SIZE_SMALL} color={MainColor.white} />
@@ -39,3 +48,22 @@ const drawerItemsForumBeranda = ({
color: MainColor.red,
},
];
const drawerItemsForumComentar = ({ id }: { id: string }) => [
{
icon: (
<Ionicons name="flag" size={ICON_SIZE_SMALL} color={MainColor.white} />
),
label: "Laporkan",
// color: MainColor.white,
path: `/forum/${id}/report-commentar`,
},
{
icon: (
<Ionicons name="trash" size={ICON_SIZE_SMALL} color={MainColor.white} />
),
label: "Hapus",
color: MainColor.red,
path: "",
},
];

View File

@@ -0,0 +1,33 @@
import { MenuDrawerDynamicGrid } from "@/components";
import { drawerItemsForumComentar } from "../ListPage";
import { router } from "expo-router";
export default function Forum_MenuDrawerCommentar({
id,
setShowDeleteAlert,
setIsDrawerOpen,
}: {
id: string;
setShowDeleteAlert: (value: boolean) => void;
setIsDrawerOpen: (value: boolean) => void;
}) {
const handlePress = (item: any) => {
if (item.label === "Hapus") {
setShowDeleteAlert(true);
} else {
router.push(item.path as any);
}
setIsDrawerOpen(false);
};
return (
<>
<MenuDrawerDynamicGrid
data={drawerItemsForumComentar({ id })}
columns={4}
onPressItem={handlePress}
/>
</>
);
}

View File

@@ -0,0 +1,20 @@
import { BaseBox, StackCustom, TextCustom } from "@/components";
import { listDummyReportForum } from "@/lib/dummy-data/forum/report-list";
import { View } from "react-native";
export default function Forum_ReportListSection() {
return (
<>
<BaseBox>
<StackCustom>
{listDummyReportForum.map((e, i) => (
<View key={i}>
<TextCustom>{e.title}</TextCustom>
<TextCustom>{e.desc}</TextCustom>
</View>
))}
</StackCustom>
</BaseBox>
</>
);
}