first commit new version
This commit is contained in:
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/>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user