diff --git a/src/app/(application)/detail-feature/page.tsx b/src/app/(application)/detail-feature/page.tsx deleted file mode 100644 index 7838a54..0000000 --- a/src/app/(application)/detail-feature/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { ViewDetailFeature } from '@/module/home'; -import React from 'react'; - -function Page() { - return ( - - ); -} - -export default Page; \ No newline at end of file diff --git a/src/app/(application)/home/page.tsx b/src/app/(application)/home/page.tsx index f1e2ec6..7aa3ca1 100644 --- a/src/app/(application)/home/page.tsx +++ b/src/app/(application)/home/page.tsx @@ -1,9 +1,13 @@ -import LayoutNavbarHome from '@/module/_global/layout/layout_navbar_home'; -import { ViewHome } from '@/module/home'; -import { Flex, Group, Text } from '@mantine/core'; +import { ViewDetailFeature, ViewHome, ViewNotification, ViewSearch } from '@/module/home'; import React from 'react'; -function Page() { +function Page({ searchParams }: { searchParams: { cat: string } }) { + if (searchParams.cat == "notification") + return + if (searchParams.cat == "search") + return + if (searchParams.cat == "fitur") + return return ( <> diff --git a/src/app/(application)/notification/page.tsx b/src/app/(application)/notification/page.tsx deleted file mode 100644 index 67c880a..0000000 --- a/src/app/(application)/notification/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { ViewNotification } from '@/module/notification'; -import React from 'react'; - -function Page() { - return ( - - ); -} - -export default Page; diff --git a/src/app/(application)/search/page.tsx b/src/app/(application)/search/page.tsx deleted file mode 100644 index 198a79b..0000000 --- a/src/app/(application)/search/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { ViewSearch } from '@/module/search'; -import React from 'react'; - -function Page() { - return ( - - ); -} - -export default Page; diff --git a/src/module/home/components/features.tsx b/src/module/home/components/features.tsx index 5a842d5..e9ead7f 100644 --- a/src/module/home/components/features.tsx +++ b/src/module/home/components/features.tsx @@ -56,7 +56,7 @@ export default function Features() { Pengumuman - router.push('detail-feature')}> + router.push('/home?cat=fitur')}>
- router.push('/search')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> + router.push('/home?cat=search')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> - router.push('/notification')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> + router.push('/home?cat=notification')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> - router.push('/profile')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> + router.push('/profile')} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings"> diff --git a/src/module/home/index.ts b/src/module/home/index.ts index 0a599af..7b242dd 100644 --- a/src/module/home/index.ts +++ b/src/module/home/index.ts @@ -1,5 +1,9 @@ import ViewDetailFeature from "./view/view_detail_feature"; import ViewHome from "./view/view_home"; +import ViewNotification from "./view/view_notification"; +import ViewSearch from "./view/view_search"; export { ViewHome } -export {ViewDetailFeature} \ No newline at end of file +export { ViewDetailFeature } +export { ViewSearch } +export { ViewNotification } \ No newline at end of file diff --git a/src/module/home/view/view_home.tsx b/src/module/home/view/view_home.tsx index 28fe7ff..7dc0b8c 100644 --- a/src/module/home/view/view_home.tsx +++ b/src/module/home/view/view_home.tsx @@ -1,7 +1,6 @@ -import { LayoutNavbarHome, WARNA } from '@/module/_global'; -import { ActionIcon, Anchor, Box, Group, rem, Stack, Text } from '@mantine/core'; +import { LayoutNavbarHome } from '@/module/_global'; +import { Box, Group, Stack, Text } from '@mantine/core'; import React from 'react'; -import { HiMagnifyingGlass, HiOutlineBell, HiOutlineUser } from "react-icons/hi2"; import Carosole from '../components/carosole'; import Features from '../components/features'; import IconNavbar from '../components/ui/icon_navbar'; @@ -14,7 +13,7 @@ export default function ViewHome() { Perbekal Darmasaba - + diff --git a/src/module/notification/view/view_notification.tsx b/src/module/home/view/view_notification.tsx similarity index 100% rename from src/module/notification/view/view_notification.tsx rename to src/module/home/view/view_notification.tsx diff --git a/src/module/search/view/view_search.tsx b/src/module/home/view/view_search.tsx similarity index 100% rename from src/module/search/view/view_search.tsx rename to src/module/home/view/view_search.tsx diff --git a/src/module/notification/index.ts b/src/module/notification/index.ts deleted file mode 100644 index 46ca4d0..0000000 --- a/src/module/notification/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ViewNotification from "./view/view_notification"; - -export {ViewNotification} \ No newline at end of file diff --git a/src/module/search/index.ts b/src/module/search/index.ts deleted file mode 100644 index c9195cd..0000000 --- a/src/module/search/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ViewSearch from "./view/view_search"; - -export {ViewSearch} \ No newline at end of file