UI Job
# style - UI Job di bagian user selesai # fix - Scroll data untuk beranda dan tampilan yang lain selesi ## No issue
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { Center, Loader, Stack } from "@mantine/core";
|
||||
import { Box, Center, Loader, Stack } from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import { MODEL_FORUM_KOMENTAR, MODEL_FORUM_POSTING } from "../model/interface";
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function Forum_MainDetail({
|
||||
dataPosting: MODEL_FORUM_POSTING;
|
||||
listKomentar: MODEL_FORUM_KOMENTAR[];
|
||||
userLoginId: string;
|
||||
countKomentar: number
|
||||
countKomentar: number;
|
||||
}) {
|
||||
const [data, setData] = useState(dataPosting);
|
||||
const [lsKomentar, setLsKomentar] = useState(listKomentar);
|
||||
@@ -90,34 +90,37 @@ export default function Forum_MainDetail({
|
||||
""
|
||||
)}
|
||||
|
||||
<ScrollOnly
|
||||
height={lsKomentar.length < 5 ? "50vh" : "70vh"}
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={lsKomentar}
|
||||
setData={setLsKomentar}
|
||||
moreData={async () => {
|
||||
const loadData = await forum_funGetAllKomentarById({
|
||||
postingId: data.id,
|
||||
page: activePage + 1,
|
||||
});
|
||||
setActivePage((val) => val + 1);
|
||||
<Box >
|
||||
<ScrollOnly
|
||||
|
||||
height={"60vh"}
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={lsKomentar}
|
||||
setData={setLsKomentar}
|
||||
moreData={async () => {
|
||||
const loadData = await forum_funGetAllKomentarById({
|
||||
postingId: data.id,
|
||||
page: activePage + 1,
|
||||
});
|
||||
setActivePage((val) => val + 1);
|
||||
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentForum_KomentarView
|
||||
data={item}
|
||||
setKomentar={setLsKomentar}
|
||||
postingId={data?.id}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentForum_KomentarView
|
||||
data={item}
|
||||
setKomentar={setLsKomentar}
|
||||
postingId={data?.id}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
</Box>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -151,7 +151,7 @@ export default function Forum_Beranda({
|
||||
}}
|
||||
>
|
||||
{loadingCreate ? (
|
||||
<Loader size={25} />
|
||||
<Loader color={AccentColor.yellow} size={25} />
|
||||
) : (
|
||||
<IconPencilPlus color="white" />
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
|
||||
import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global";
|
||||
import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||
import {
|
||||
Avatar,
|
||||
@@ -25,20 +26,7 @@ export default function Forum_Splash() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ComponentGlobal_UI_LayoutTamplate>
|
||||
<ViewSplash />
|
||||
</ComponentGlobal_UI_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ViewSplash() {
|
||||
return (
|
||||
<>
|
||||
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
|
||||
<IconMessages size={350} color="white" />
|
||||
<Loader variant="dots" color="white" />
|
||||
</Stack>
|
||||
<ComponentGlobal_SplashScreen icon={<IconMessages size={300} />} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user