diff --git a/src/app/dev/forum/main/layout.tsx b/src/app/dev/forum/main/layout.tsx index 0f0337a7..6e48fd86 100644 --- a/src/app/dev/forum/main/layout.tsx +++ b/src/app/dev/forum/main/layout.tsx @@ -8,7 +8,6 @@ export default async function Layout({ children: React.ReactNode; }) { const userLoginId = await funGetUserIdByToken(); - return ( <> diff --git a/src/app_modules/_global/ui/V2_layout_tamplate.tsx b/src/app_modules/_global/ui/V2_layout_tamplate.tsx index acce22e4..1d15953e 100644 --- a/src/app_modules/_global/ui/V2_layout_tamplate.tsx +++ b/src/app_modules/_global/ui/V2_layout_tamplate.tsx @@ -134,7 +134,7 @@ export function UI_NewChildren({ children }: { children: ReactNode }) { const { classes } = useStyles(); return ( - + {children} diff --git a/src/app_modules/forum/detail/layout.tsx b/src/app_modules/forum/detail/layout.tsx index f563082f..58453638 100644 --- a/src/app_modules/forum/detail/layout.tsx +++ b/src/app_modules/forum/detail/layout.tsx @@ -1,8 +1,11 @@ "use client"; +import { Component_Header } from "@/app_modules/_global/component/new/component_header"; import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; -import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; -import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; +import UI_NewLayoutTamplate, { + UI_NewChildren, + UI_NewHeader, +} from "@/app_modules/_global/ui/V2_layout_tamplate"; import { useRouter } from "next/navigation"; import React, { useState } from "react"; @@ -19,13 +22,20 @@ export default function LayoutForum_Detail({ return ( <> - } > {children} - + */} + + + + + + {children} + ); } diff --git a/src/app_modules/forum/detail/main_detail.tsx b/src/app_modules/forum/detail/main_detail.tsx index 962a3159..58b6de01 100644 --- a/src/app_modules/forum/detail/main_detail.tsx +++ b/src/app_modules/forum/detail/main_detail.tsx @@ -165,7 +165,7 @@ export default function Forum_MainDetail({ ) : ( (
diff --git a/src/app_modules/forum/forumku/index.tsx b/src/app_modules/forum/forumku/index.tsx index d77f4746..2b9515b7 100644 --- a/src/app_modules/forum/forumku/index.tsx +++ b/src/app_modules/forum/forumku/index.tsx @@ -5,11 +5,7 @@ import { apiGetUserById } from "@/app_modules/_global/lib/api_user"; import { MODEL_USER } from "@/app_modules/home/model/interface"; import { RouterForum } from "@/lib/router_hipmi/router_forum"; import { clientLogger } from "@/util/clientLogger"; -import { - Center, - Loader, - Stack -} from "@mantine/core"; +import { Center, Loader, Stack } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import _ from "lodash"; import { ScrollOnly } from "next-scroll-loader"; @@ -123,7 +119,7 @@ export default function Forum_Forumku({ ) : ( // --- Main component --- // (
diff --git a/src/app_modules/forum/forumku/layout.tsx b/src/app_modules/forum/forumku/layout.tsx index 34c6c3bd..51652060 100644 --- a/src/app_modules/forum/forumku/layout.tsx +++ b/src/app_modules/forum/forumku/layout.tsx @@ -1,7 +1,12 @@ "use client"; +import { Component_Header } from "@/app_modules/_global/component/new/component_header"; import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; +import UI_NewLayoutTamplate, { + UI_NewHeader, + UI_NewChildren, +} from "@/app_modules/_global/ui/V2_layout_tamplate"; import { IconX } from "@tabler/icons-react"; import React from "react"; @@ -12,13 +17,20 @@ export default function LayoutForum_Forumku({ }) { return ( <> - } /> + } /> } > {children} - + */} + + + + } /> + + {children} + ); } diff --git a/src/app_modules/forum/main/beranda.tsx b/src/app_modules/forum/main/beranda.tsx index 0c919e56..85aade76 100644 --- a/src/app_modules/forum/main/beranda.tsx +++ b/src/app_modules/forum/main/beranda.tsx @@ -3,7 +3,15 @@ import ComponentGlobal_CreateButton from "@/app_modules/_global/component/button_create"; import { RouterForum } from "@/lib/router_hipmi/router_forum"; import { clientLogger } from "@/util/clientLogger"; -import { Affix, Center, Loader, Stack, TextInput, rem } from "@mantine/core"; +import { + Affix, + Box, + Center, + Loader, + Stack, + TextInput, + rem, +} from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import _ from "lodash"; import { ScrollOnly } from "next-scroll-loader"; @@ -15,6 +23,7 @@ import { Forum_ComponentIsDataEmpty } from "../component/other_component"; import { Forum_SkeletonCard } from "../component/skeleton_view"; import { MODEL_FORUM_POSTING } from "../model/interface"; import mqtt_client from "@/util/mqtt_client"; +import { AccentColor } from "@/app_modules/_global/color"; export default function Forum_Beranda({ userLoginId, @@ -155,7 +164,7 @@ export default function Forum_Beranda({ - + ) : ( // --- Main component --- // - ( -
- -
- )} - data={data} - setData={setData as any} - moreData={handleMoreData} + - {(item) => ( - { - setData(val); - }} - allData={data} - /> - )} -
+ ( +
+ +
+ )} + data={data} + setData={setData as any} + moreData={handleMoreData} + > + {(item) => ( + { + setData(val); + }} + allData={data} + /> + )} +
+ )}
diff --git a/src/app_modules/forum/main/layout.tsx b/src/app_modules/forum/main/layout.tsx index aedbde9a..a614a0e4 100644 --- a/src/app_modules/forum/main/layout.tsx +++ b/src/app_modules/forum/main/layout.tsx @@ -1,18 +1,21 @@ "use client"; -import { RouterForum } from "@/lib/router_hipmi/router_forum"; import { ComponentGlobal_LoaderAvatar } from "@/app_modules/_global/component"; import ComponentGlobal_Loader from "@/app_modules/_global/component/loader"; -import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; -import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; +import { Component_Header } from "@/app_modules/_global/component/new/component_header"; +import { apiGetUserById } from "@/app_modules/_global/lib/api_user"; +import UI_NewLayoutTamplate, { + UI_NewChildren, + UI_NewHeader, +} from "@/app_modules/_global/ui/V2_layout_tamplate"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; import { MODEL_USER } from "@/app_modules/home/model/interface"; -import { ActionIcon, Avatar } from "@mantine/core"; +import { RouterForum } from "@/lib/router_hipmi/router_forum"; +import { clientLogger } from "@/util/clientLogger"; +import { ActionIcon, Avatar, TextInput } from "@mantine/core"; +import { useShallowEffect } from "@mantine/hooks"; import { useRouter } from "next/navigation"; import React, { useState } from "react"; -import { useShallowEffect } from "@mantine/hooks"; -import { apiGetUserById } from "@/app_modules/_global/lib/api_user"; -import { clientLogger } from "@/util/clientLogger"; -import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; export default function LayoutForum_Main({ userLoginId, @@ -45,13 +48,56 @@ export default function LayoutForum_Main({ return ( <> - + + + ) : ( + { + setIsLoading(true); + router.push(RouterForum.forumku + data?.id); + }} + > + {isLoading ? ( + + + + ) : ( + + )} + + ) + } + /> + + + {children} + + + {/* + ) : ( {children} - + */} ); } diff --git a/src/app_modules/forum/report/komentar/layout.tsx b/src/app_modules/forum/report/komentar/layout.tsx index 6e47e284..75eaeee2 100644 --- a/src/app_modules/forum/report/komentar/layout.tsx +++ b/src/app_modules/forum/report/komentar/layout.tsx @@ -1,7 +1,9 @@ "use client"; +import { Component_Header } from "@/app_modules/_global/component/new/component_header"; import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; +import UI_NewLayoutTamplate, { UI_NewHeader, UI_NewChildren } from "@/app_modules/_global/ui/V2_layout_tamplate"; import React from "react"; export default function LayoutForum_ReportKomentar({ @@ -11,20 +13,20 @@ export default function LayoutForum_ReportKomentar({ }) { return ( <> - } > {children} - - {/* - } - > - {children} - */} + */} + + + + + + {children} + ); } diff --git a/src/app_modules/forum/report/posting/layout.tsx b/src/app_modules/forum/report/posting/layout.tsx index 644f810c..803c5571 100644 --- a/src/app_modules/forum/report/posting/layout.tsx +++ b/src/app_modules/forum/report/posting/layout.tsx @@ -1,7 +1,10 @@ "use client"; -import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; -import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; +import { Component_Header } from "@/app_modules/_global/component/new/component_header"; +import UI_NewLayoutTamplate, { + UI_NewChildren, + UI_NewHeader, +} from "@/app_modules/_global/ui/V2_layout_tamplate"; import React from "react"; export default function LayoutForum_ReportPosting({ @@ -11,15 +14,20 @@ export default function LayoutForum_ReportPosting({ }) { return ( <> - } > {children} - + */} - + + + + + {children} + ); }