import React from "react"; // next import Link from "next/link"; import { useRouter } from "next/router"; // layouts import DefaultLayout from "layouts/default-layout"; // hooks import useUser from "hooks/use-user"; // icons import { LockIcon } from "components/icons"; type TNotAuthorizedViewProps = { actionButton?: React.ReactNode; }; export const NotAuthorizedView: React.FC = (props) => { const { actionButton } = props; const { user } = useUser(); const { asPath: currentPath } = useRouter(); return (

Oops! You are not authorized to view this page

{user ? (

You have signed in as {user.email}.{" "} Sign in {" "} with different account that has access to this page.

) : (

You need to{" "} Sign in {" "} with an account that has access to this page.

)}
{actionButton}
); };