fix
Desc: - Tampilan untuk ios
This commit is contained in:
@@ -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 (
|
||||
<>
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
|
||||
@@ -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"} />
|
||||
|
||||
Reference in New Issue
Block a user