feature
Desskripsi: - new page: other-report-commentar, other-report-posting, report-commentar, report-posting # No Issue
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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: "",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
20
screens/Forum/ReportListSection.tsx
Normal file
20
screens/Forum/ReportListSection.tsx
Normal 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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user