import React from "react"; // next import Link from "next/link"; import Image from "next/image"; import { useRouter } from "next/router"; // layouts import DefaultLayout from "layouts/default-layout"; // hooks import useUser from "hooks/use-user"; // images import ProjectNotAuthorizedImg from "public/auth/project-not-authorized.svg"; import WorkspaceNotAuthorizedImg from "public/auth/workspace-not-authorized.svg"; type Props = { actionButton?: React.ReactNode; type: "project" | "workspace"; }; export const NotAuthorizedView: React.FC = ({ actionButton, type }) => { const { user } = useUser(); const { asPath: currentPath } = useRouter(); return (
ProjectSettingImg

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}
); };