|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -1,8 +0,0 @@
|
|||||||
import Halaman, { Menu } from "@/modules/contoh";
|
|
||||||
|
|
||||||
export default function ContohPage() {
|
|
||||||
return <>
|
|
||||||
<Halaman />
|
|
||||||
<Menu />
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
7
src/app/dev/auth/splash/page.tsx
Normal file
7
src/app/dev/auth/splash/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { SplashScreen } from "@/app_modules/auth";
|
||||||
|
|
||||||
|
export default function Page(){
|
||||||
|
return<>
|
||||||
|
<SplashScreen/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
"use client";
|
|
||||||
import {
|
|
||||||
AppShell,
|
|
||||||
Box,
|
|
||||||
Burger,
|
|
||||||
Button,
|
|
||||||
Flex,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
MediaQuery,
|
|
||||||
Menu,
|
|
||||||
Text,
|
|
||||||
useMantineTheme,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import router from "next/router";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function LayoutDashboardAdmin({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const theme = useMantineTheme();
|
|
||||||
const [opened, setOpened] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell
|
|
||||||
styles={{
|
|
||||||
main: {
|
|
||||||
background:
|
|
||||||
theme.colorScheme === "dark"
|
|
||||||
? theme.colors.dark[8]
|
|
||||||
: theme.colors.gray[0],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
// navbarOffsetBreakpoint="sm"
|
|
||||||
// asideOffsetBreakpoint="sm"
|
|
||||||
header={
|
|
||||||
<Header height={{ base: 50, md: 70 }} p="md">
|
|
||||||
<div style={{ height: "100%" }}>
|
|
||||||
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
|
||||||
<Burger
|
|
||||||
opened={opened}
|
|
||||||
onClick={() => setOpened((o) => !o)}
|
|
||||||
size="sm"
|
|
||||||
color={theme.colors.gray[6]}
|
|
||||||
mr="xl"
|
|
||||||
/>
|
|
||||||
</MediaQuery>
|
|
||||||
|
|
||||||
<Group position="apart">
|
|
||||||
<Text>Dashboard Admin</Text>
|
|
||||||
<Button>Admin</Button>
|
|
||||||
</Group>
|
|
||||||
</div>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import DashboardAdmin from "@/modules/dashboard_admin";
|
|
||||||
|
|
||||||
export default function PageDashboardAdmin(){
|
|
||||||
return <>
|
|
||||||
<DashboardAdmin/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
"use client";
|
|
||||||
import {
|
|
||||||
AppShell,
|
|
||||||
Box,
|
|
||||||
Burger,
|
|
||||||
Button,
|
|
||||||
Flex,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
MediaQuery,
|
|
||||||
Menu,
|
|
||||||
Text,
|
|
||||||
useMantineTheme,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import router from "next/router";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function LayoutDashboardSuperAdmin({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const theme = useMantineTheme();
|
|
||||||
const [opened, setOpened] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell
|
|
||||||
styles={{
|
|
||||||
main: {
|
|
||||||
background:
|
|
||||||
theme.colorScheme === "dark"
|
|
||||||
? theme.colors.dark[8]
|
|
||||||
: theme.colors.gray[0],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
// navbarOffsetBreakpoint="sm"
|
|
||||||
// asideOffsetBreakpoint="sm"
|
|
||||||
header={
|
|
||||||
<Header height={{ base: 50, md: 70 }} p="md">
|
|
||||||
<div style={{ height: "100%" }}>
|
|
||||||
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
|
||||||
<Burger
|
|
||||||
opened={opened}
|
|
||||||
onClick={() => setOpened((o) => !o)}
|
|
||||||
size="sm"
|
|
||||||
color={theme.colors.gray[6]}
|
|
||||||
mr="xl"
|
|
||||||
/>
|
|
||||||
</MediaQuery>
|
|
||||||
|
|
||||||
<Group position="apart">
|
|
||||||
<Text>Dashboard Super Admin</Text>
|
|
||||||
<Button>Super Admin</Button>
|
|
||||||
</Group>
|
|
||||||
</div>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import DashboardSuperAdmin from "@/modules/dashboard_super_admin";
|
|
||||||
|
|
||||||
export default function PageDashboardSuperAdmin(){
|
|
||||||
return <>
|
|
||||||
<DashboardSuperAdmin/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
"use client";
|
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Aside,
|
|
||||||
AspectRatio,
|
|
||||||
Box,
|
|
||||||
Burger,
|
|
||||||
Button,
|
|
||||||
Flex,
|
|
||||||
Footer,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
HoverCard,
|
|
||||||
Image,
|
|
||||||
MediaQuery,
|
|
||||||
Menu,
|
|
||||||
Navbar,
|
|
||||||
Text,
|
|
||||||
useMantineTheme,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
|
|
||||||
export default function LayoutLandingPage({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const theme = useMantineTheme();
|
|
||||||
const [opened, setOpened] = useState(false);
|
|
||||||
|
|
||||||
//menunggu rendering client karena tampilan di mulai dirender pada server
|
|
||||||
const [waiting, setWaiting] = useState(false);
|
|
||||||
useShallowEffect(() => {
|
|
||||||
if (window) setWaiting(true);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (!waiting) return <></>;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell
|
|
||||||
styles={{
|
|
||||||
main: {
|
|
||||||
background:
|
|
||||||
theme.colorScheme === "dark"
|
|
||||||
? theme.colors.dark[8]
|
|
||||||
: theme.colors.gray[0],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
// navbarOffsetBreakpoint="sm"
|
|
||||||
// asideOffsetBreakpoint="sm"
|
|
||||||
header={
|
|
||||||
<Header height={{ base: 50, md: 70 }} p="md">
|
|
||||||
<div style={{ height: "100%" }}>
|
|
||||||
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
|
||||||
<Burger
|
|
||||||
opened={opened}
|
|
||||||
onClick={() => setOpened((o) => !o)}
|
|
||||||
size="sm"
|
|
||||||
color={theme.colors.gray[6]}
|
|
||||||
mr="xl"
|
|
||||||
/>
|
|
||||||
</MediaQuery>
|
|
||||||
|
|
||||||
<Group position="apart">
|
|
||||||
<Image maw={150} src="/img/logo_1.png" alt="Random image" />
|
|
||||||
<Box>
|
|
||||||
<Flex gap={"xl"}>
|
|
||||||
<Text>Beranda</Text>
|
|
||||||
<Text>Tentang Kami</Text>
|
|
||||||
<Text>Informasi</Text>
|
|
||||||
<Text>Galeri</Text>
|
|
||||||
</Flex>
|
|
||||||
</Box>
|
|
||||||
<Menu position="bottom">
|
|
||||||
<Menu.Target>
|
|
||||||
<Button>Login</Button>
|
|
||||||
</Menu.Target>
|
|
||||||
<Menu.Dropdown>
|
|
||||||
<Menu.Item onClick={() => router.push("/dev/login")}>
|
|
||||||
Login
|
|
||||||
</Menu.Item>
|
|
||||||
<Menu.Item
|
|
||||||
onClick={() => router.push("/dev/dashboard-admin")}
|
|
||||||
>
|
|
||||||
Dashboard Admin
|
|
||||||
</Menu.Item>
|
|
||||||
<Menu.Item
|
|
||||||
onClick={() => router.push("/dev/dashboard-super-admin")}
|
|
||||||
>
|
|
||||||
Dashboard Super Admin
|
|
||||||
</Menu.Item>
|
|
||||||
</Menu.Dropdown>
|
|
||||||
</Menu>
|
|
||||||
</Group>
|
|
||||||
</div>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import LandingPage from "@/modules/landing_page";
|
|
||||||
import { Button, Menu, Stack } from "@mantine/core";
|
|
||||||
|
|
||||||
export default function PageLandingPage() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LandingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { LoginPage } from "@/modules/login";
|
|
||||||
|
|
||||||
export default function PageLogin() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LoginPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import PageLandingPage from "./landing-page/page";
|
|
||||||
|
|
||||||
export default async function PageDev() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<PageLandingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { RegisterPage } from "@/modules/login";
|
|
||||||
|
|
||||||
export default function PageRegister(){
|
|
||||||
return <>
|
|
||||||
<RegisterPage/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,7 @@
|
|||||||
import LayoutLandingPage from "./dev/landing-page/layout";
|
import { redirect } from "next/navigation";
|
||||||
import PageLandingPage from "./dev/landing-page/page";
|
|
||||||
import PageDev from "./dev/page";
|
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
|
|
||||||
return (
|
return redirect("/dev/auth/splash")
|
||||||
// <Page1 data={store.get("session")?.value} />
|
|
||||||
// <div>
|
|
||||||
// <center>
|
|
||||||
// <h1>HIPMI PROJECT</h1>
|
|
||||||
// <p>Bip Production@Team_wibu</p>
|
|
||||||
// <a href="/dev">Project</a>
|
|
||||||
// </center>
|
|
||||||
// </div>
|
|
||||||
<LayoutLandingPage>
|
|
||||||
<PageLandingPage/>
|
|
||||||
</LayoutLandingPage>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
3
src/app_modules/auth/index.ts
Normal file
3
src/app_modules/auth/index.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import SplashScreen from "./splash/view";
|
||||||
|
|
||||||
|
export {SplashScreen}
|
||||||
10
src/app_modules/auth/splash/view.tsx
Normal file
10
src/app_modules/auth/splash/view.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import { Title } from "@mantine/core"
|
||||||
|
|
||||||
|
export default function SplashScreen(){
|
||||||
|
return <>
|
||||||
|
<Title>Splash Screen</Title>
|
||||||
|
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { funLihatNama } from "./lihat_nama";
|
|
||||||
|
|
||||||
export { funLihatNama }
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export function funLihatNama() {
|
|
||||||
console.log("nama malik")
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import valNama from "./val/get_nama";
|
|
||||||
import Halaman, { Menu } from "./view";
|
|
||||||
|
|
||||||
export default Halaman
|
|
||||||
export { valNama }
|
|
||||||
export { Menu }
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
const valNama = "malik"
|
|
||||||
export default valNama
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export default function Halaman() {
|
|
||||||
return <>
|
|
||||||
<div>Halaman</div>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import Halaman from "./halaman";
|
|
||||||
import Menu from "./menu";
|
|
||||||
|
|
||||||
export default Halaman
|
|
||||||
export { Menu }
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export default function Menu() {
|
|
||||||
return <>
|
|
||||||
ini adalah Menu
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
export function DashboardAdmin(){
|
|
||||||
return <>
|
|
||||||
<div>
|
|
||||||
ini dashboard admin
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { DashboardAdmin } from "./dashboard_admin";
|
|
||||||
|
|
||||||
export default DashboardAdmin
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
export function DashboardSuperAdmin(){
|
|
||||||
return <>
|
|
||||||
<div>Ini super admin</div>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { DashboardSuperAdmin } from "./dashboard_super_admin";
|
|
||||||
|
|
||||||
export default DashboardSuperAdmin
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
import { LandingPage } from "./landing-page";
|
|
||||||
|
|
||||||
export default LandingPage;
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { Box } from "@mantine/core"
|
|
||||||
|
|
||||||
export function LandingPage(){
|
|
||||||
return <>
|
|
||||||
<Box>
|
|
||||||
ini Landing
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import LoginPage from "./login_page";
|
|
||||||
import RegisterPage from "./register_page";
|
|
||||||
|
|
||||||
export {LoginPage}
|
|
||||||
export {RegisterPage}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { LoginPage } from "./login_page";
|
|
||||||
|
|
||||||
export default LoginPage
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { Button } from "@mantine/core"
|
|
||||||
import { useRouter } from "next/navigation"
|
|
||||||
|
|
||||||
export function LoginPage(){
|
|
||||||
const router = useRouter()
|
|
||||||
return <>
|
|
||||||
<div>ini login</div>
|
|
||||||
<Button onClick={() =>router.push("/dev/registrasi") }>Register</Button>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { RegisterPage } from "./register_page";
|
|
||||||
|
|
||||||
export default RegisterPage
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
export function RegisterPage(){
|
|
||||||
return <>
|
|
||||||
<div>ini register</div>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user