Desc:
- Tampilan untuk ios
This commit is contained in:
2023-10-03 13:50:18 +08:00
parent 9a914bb513
commit a82019552f
4 changed files with 20 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ export default async function Page() {
// }) // })
// ); // );
if (!c?.value) return redirect("/dev/auth/login"); // if (!c?.value) return redirect("/dev/auth/login");
return ( return (
<> <>

View File

@@ -1,10 +1,12 @@
"use client"; "use client";
import { myConsole } from "@/app/fun/my_console"; import { myConsole } from "@/app/fun/my_console";
import { ApiHipmi } from "@/app/lib/api"; import { ApiHipmi } from "@/app/lib/api";
import { Button } from "@mantine/core"; import { ActionIcon, Button } from "@mantine/core";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { useAtom } from "jotai"; import { useAtom } from "jotai";
import { gs_nomor, gs_otp } from "../state/state"; import { gs_nomor, gs_otp } from "../state/state";
import { IconLogout } from "@tabler/icons-react";
import { Warna } from "@/app/lib/warna";
export default function Logout() { export default function Logout() {
const router = useRouter(); const router = useRouter();
@@ -28,9 +30,9 @@ export default function Logout() {
return ( return (
<> <>
<Button compact onClick={() => onLogout()}> <ActionIcon variant="transparent">
Logout <IconLogout color={Warna.merah} onClick={() => onLogout()}/>
</Button> </ActionIcon>
</> </>
); );
} }

View File

@@ -2,6 +2,7 @@
import { ActionIcon, AppShell, Flex, Group, Header, Text } from "@mantine/core"; import { ActionIcon, AppShell, Flex, Group, Header, Text } from "@mantine/core";
import { HomeView } from "."; import { HomeView } from ".";
import { IconUserSearch, IconAward, IconQrcode } from "@tabler/icons-react"; import { IconUserSearch, IconAward, IconQrcode } from "@tabler/icons-react";
import { Logout } from "../auth";
export default function HomeLayout({ children }: { children: any }) { export default function HomeLayout({ children }: { children: any }) {
return ( return (
@@ -10,20 +11,23 @@ export default function HomeLayout({ children }: { children: any }) {
header={ header={
<Header height={50} bg={"dark"}> <Header height={50} bg={"dark"}>
<Group position="apart" align="center" h={50} p={"sm"}> <Group position="apart" align="center" h={50} p={"sm"}>
<ActionIcon> <Group spacing={"sm"}>
<IconUserSearch /> <ActionIcon>
</ActionIcon> <IconUserSearch />
<Text color="white" fw={"bold"}> </ActionIcon>
HIPMI
</Text>
<Flex justify={"flex-end"}>
<ActionIcon> <ActionIcon>
<IconAward /> <IconAward />
</ActionIcon> </ActionIcon>
</Group>
<Text color="white" fw={"bold"}>
HIPMI
</Text>
<Group spacing={"sm"}>
<ActionIcon> <ActionIcon>
<IconQrcode /> <IconQrcode />
</ActionIcon> </ActionIcon>
</Flex> <Logout />
</Group>
</Group> </Group>
</Header> </Header>
} }

View File

@@ -95,7 +95,7 @@ export default function HomeView() {
<IconUserCircle size={50} color="black" /> <IconUserCircle size={50} color="black" />
</ActionIcon> </ActionIcon>
<Text>Welcome to, {token?.username}</Text> <Text>Welcome to, {token?.username ? token?.username : "SERVER ERROR"}</Text>
</Flex> </Flex>
<Paper bg={"dark"} radius={5} my={"xs"}> <Paper bg={"dark"} radius={5} my={"xs"}>
<Image alt="logo" src={"/aset/logo.png"} /> <Image alt="logo" src={"/aset/logo.png"} />