## feat
- Tampilan forum
- Tampilan forumku
- Tampilan komentar
- Tampilam posting
- Tampilan Detail posting
- Tampilan Edit postinf
- Tampilan edit komentat
- Tampilan report posting
- Tampilan report komentar
### No issuee
This commit is contained in:
2024-03-07 12:20:22 +08:00
parent a3f507169a
commit 629fd601d4
67 changed files with 2110 additions and 79 deletions

View File

@@ -0,0 +1,84 @@
"use client"
import {
ActionIcon,
Button,
Center,
Group,
Loader,
Paper,
Stack,
} from "@mantine/core";
import "react-quill/dist/quill.snow.css";
import "react-quill/dist/quill.bubble.css";
import { IconPhotoUp } from "@tabler/icons-react";
import { useShallowEffect } from "@mantine/hooks";
import { useRouter } from "next/navigation";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
import dynamic from "next/dynamic";
import React, { useState } from "react";
import { useAtom } from "jotai";
import { gs_forum_loading_edit_posting } from "../../global_state";
const ReactQuill = dynamic(
() => {
return import("react-quill");
},
{ ssr: false }
);
export default function Forum_EditKomentar() {
const [value, setValue] = useState("");
const [reload, setReload] = useState(false);
useShallowEffect(() => {
if (window && window.document) setReload(true);
}, []);
if (!reload)
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
return (
<>
<Stack>
<Paper withBorder shadow="lg">
<ReactQuill
theme="bubble"
placeholder="Apa yang sedang hangat dibicarakan ?"
style={{ height: 150 }}
onChange={(val) => {
setValue(val);
}}
/>
</Paper>
<Group position="right">
{/* <ActionIcon>
<IconPhotoUp />
</ActionIcon> */}
<ButtonAction />
</Group>
</Stack>
<div dangerouslySetInnerHTML={{ __html: value }} />
</>
);
}
function ButtonAction() {
const router = useRouter();
const [loadingEdit, setLoadingEdit] = useAtom(gs_forum_loading_edit_posting);
return (
<>
<Button radius={"xl"} onClick={() => {
router.back()
}}>
Update
</Button>
</>
);
}

View File

@@ -0,0 +1,21 @@
"use client";
import { AppShell } from "@mantine/core";
import React from "react";
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
export default function LayoutForum_EditKomentar({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={<ComponentForum_HeaderTamplate title="Edit Komentar" />}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,84 @@
"use client"
import {
ActionIcon,
Button,
Center,
Group,
Loader,
Paper,
Stack,
} from "@mantine/core";
import "react-quill/dist/quill.snow.css";
import "react-quill/dist/quill.bubble.css";
import { IconPhotoUp } from "@tabler/icons-react";
import { useShallowEffect } from "@mantine/hooks";
import { useRouter } from "next/navigation";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
import dynamic from "next/dynamic";
import React, { useState } from "react";
import { useAtom } from "jotai";
import { gs_forum_loading_edit_posting } from "../../global_state";
const ReactQuill = dynamic(
() => {
return import("react-quill");
},
{ ssr: false }
);
export default function Forum_EditPosting() {
const [value, setValue] = useState("");
const [reload, setReload] = useState(false);
useShallowEffect(() => {
if (window && window.document) setReload(true);
}, []);
if (!reload)
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
return (
<>
<Stack>
<Paper withBorder shadow="lg">
<ReactQuill
theme="bubble"
placeholder="Apa yang sedang hangat dibicarakan ?"
style={{ height: 150 }}
onChange={(val) => {
setValue(val);
}}
/>
</Paper>
<Group position="right">
{/* <ActionIcon>
<IconPhotoUp />
</ActionIcon> */}
<ButtonAction />
</Group>
</Stack>
<div dangerouslySetInnerHTML={{ __html: value }} />
</>
);
}
function ButtonAction() {
const router = useRouter();
const [loadingEdit, setLoadingEdit] = useAtom(gs_forum_loading_edit_posting);
return (
<>
<Button radius={"xl"} onClick={() => {
router.back()
}}>
Update
</Button>
</>
);
}

View File

@@ -0,0 +1,21 @@
"use client";
import { AppShell } from "@mantine/core";
import React from "react";
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
export default function LayoutForum_EditPosting({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={<ComponentForum_HeaderTamplate title="Edit Postingan" />}
>
{children}
</AppShell>
</>
);
}