diff --git a/apps/web/src/app/(auth)/layout.tsx b/apps/web/src/app/(auth)/layout.tsx index b4e07f5c..91936200 100644 --- a/apps/web/src/app/(auth)/layout.tsx +++ b/apps/web/src/app/(auth)/layout.tsx @@ -85,7 +85,7 @@ export default async function RootLayout(props: { children: React.ReactNode }) { name={isLoggedIn.user.name ?? ""} email={isLoggedIn.user.email ?? ""} nameFallback={isLoggedIn.user.name?.slice(0, 2) ?? ""} - role={isLoggedIn.user.role} + role={isLoggedIn.user.role!} > {props.children} diff --git a/apps/web/src/app/_components/admin/all-registered-user/index.tsx b/apps/web/src/app/_components/admin/all-registered-user/index.tsx index 8fb0fb8b..84d0577c 100644 --- a/apps/web/src/app/_components/admin/all-registered-user/index.tsx +++ b/apps/web/src/app/_components/admin/all-registered-user/index.tsx @@ -133,7 +133,7 @@ export const columns: ColumnDef[] = [ diff --git a/apps/web/src/app/_components/auth/login-page.tsx b/apps/web/src/app/_components/auth/login-page.tsx index 3290b2f2..3e7a8f98 100644 --- a/apps/web/src/app/_components/auth/login-page.tsx +++ b/apps/web/src/app/_components/auth/login-page.tsx @@ -48,7 +48,7 @@ export function LoginComponent() { ...values, }); - if (loginResult.error) { + if (loginResult?.error) { console.log(loginResult); toast.error("Gagal login", { description: "Email atau password salah!" });