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 (
<>

View File

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

View File

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

View File

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