auto push

This commit is contained in:
2024-04-19 11:01:02 +08:00
parent a5052f5bd0
commit a6580e9594
5 changed files with 81 additions and 52 deletions

View File

@@ -1,8 +1,16 @@
import { LayoutValidasi } from "@/app_modules/auth";
import { ActionIcon, Button } from "@mantine/core";
import Link from "next/link";
import React from "react";
export default async function Layout({children}: {children: React.ReactNode}) {
return<>
<LayoutValidasi>{children}</LayoutValidasi>
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutValidasi>{children}</LayoutValidasi>
</>
}
);
}

View File

@@ -1,6 +1,16 @@
"use client";
import { Box, Paper, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
import {
Box,
Button,
Center,
Paper,
SimpleGrid,
Stack,
Text,
TextInput,
Title,
} from "@mantine/core";
// import ViewMakuro from "./_server/makuro_view";
// import mqtt_client from "@/util/mqtt_client";
// import { useState } from "react";
@@ -57,6 +67,19 @@ import { Box, Paper, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
// );
// }
export default function Page(){
return null
export default function Page() {
return (
<Stack>
<Center>
<Stack>
<Title>LOGIN</Title>
<TextInput />
<TextInput />
<TextInput />
<TextInput />
<Button>LOGIN</Button>
</Stack>
</Center>
</Stack>
);
}

View File

@@ -8,6 +8,7 @@ import {
Image,
Paper,
Text,
Title,
} from "@mantine/core";
import React from "react";
@@ -16,28 +17,6 @@ export default function LayoutLogin({
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
// header={
// <Header height={180} sx={{ borderStyle: "none" }}>
// <Paper h={180} sx={{ borderRadius: "0 0 30px 30px" }}>
// <Center h={"100%"}>
// <Image
// mt={"xl"}
// height={130}
// width={130}
// alt="logo"
// src={"/aset/logo/logo-hipmi.png"}
// />
// </Center>
// </Paper>
// </Header>
// }
>
{children}
</AppShell>
</>
);
return <>
{children}</>;
}

View File

@@ -1,6 +1,6 @@
"use client";
import { ActionIcon, AppShell, Group, Header } from "@mantine/core";
import { ActionIcon, AppShell, Box, Group, Header, Stack } from "@mantine/core";
import { IconChevronLeft } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import React from "react";
@@ -10,24 +10,43 @@ export default function LayoutValidasi({
}: {
children: React.ReactNode;
}) {
const router = useRouter()
const router = useRouter();
return (
<>
<AppShell
bg={"red"}
header={
<Header height={50} sx={{borderStyle: "none"}} px={"md"} bg={"yellow"}>
<Group h={50} align="center">
<ActionIcon variant="transparent" onClick={() => router.back()} >
<IconChevronLeft />
</ActionIcon>
</Group>
</Header>
}
>
{children}
</AppShell>
</>
<Stack>
<Box p={"md"}>
<ActionIcon variant="transparent" onClick={() => router.back()}>
<IconChevronLeft />
</ActionIcon>
</Box>
{children}
</Stack>
);
}
// export default function LayoutValidasi({
// children,
// }: {
// children: React.ReactNode;
// }) {
// const router = useRouter()
// return (
// <>
// <AppShell
// bg={"red"}
// header={
// <Header height={50} sx={{borderStyle: "none"}} px={"md"} bg={"yellow"}>
// <Group h={50} align="center">
// <ActionIcon variant="transparent" onClick={() => router.back()} >
// <IconChevronLeft />
// </ActionIcon>
// </Group>
// </Header>
// }
// >
// {children}
// </AppShell>
// </>
// );
// }

View File

@@ -90,7 +90,7 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) {
ComponentGlobal_NotifikasiBerhasil(res.message);
router.push(RouterHome.main_home);
} else {
router.push(RouterAdminDashboard.splash_admin)
router.push(RouterAdminDashboard.splash_admin);
}
} else {
ComponentGlobal_NotifikasiPeringatan(val.message);
@@ -151,7 +151,7 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) {
{/* <pre>{JSON.stringify(code)}</pre> */}
<Center h={"80%"} bg={"blue"} >
<Center h={"80%"}>
<Stack px={"lg"} spacing={"xl"} w={{ base: 400 }} justify="center">
<Center>
<IconCloudLockOpen size={130} />