Added settings page and signout button on menu
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
FiEdit,
|
||||
FiArchive,
|
||||
FiUser,
|
||||
FiLogOut,
|
||||
FiSettings,
|
||||
} from "react-icons/fi";
|
||||
import type { IconType } from "react-icons/lib";
|
||||
@@ -27,6 +28,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { proposalSchema } from "@utils/constants/schema/project";
|
||||
import type { z } from "zod";
|
||||
import type { SubmitHandler } from "react-hook-form";
|
||||
import { signOut } from "next-auth/react";
|
||||
|
||||
export const MainLayout: React.FC<Children> = ({ children }) => {
|
||||
return (
|
||||
@@ -218,9 +220,24 @@ const MoreMenu: React.FC = () => {
|
||||
className="min-w-[250px] rounded-md bg-bg-700 p-3 data-[side=top]:animate-slideUpAndFade"
|
||||
sideOffset={10}
|
||||
>
|
||||
<DropdownMenu.Item className="flex select-none items-center justify-between px-[5px] pl-[25px] outline-none">
|
||||
<DropdownMenu.Item>
|
||||
<Link
|
||||
href="/settings"
|
||||
className="flex w-full select-none items-center justify-between px-[5px] pl-[25px] outline-none"
|
||||
>
|
||||
<p className="text-r-lg">Settings</p>
|
||||
<FiSettings />
|
||||
</Link>
|
||||
</DropdownMenu.Item>
|
||||
<DropdownMenu.Item>
|
||||
<button
|
||||
type="button"
|
||||
className="flex w-full select-none items-center justify-between px-[5px] pl-[25px] outline-none"
|
||||
onClick={() => void signOut()}
|
||||
>
|
||||
<p className="text-r-lg">Sign Out</p>
|
||||
<FiLogOut />
|
||||
</button>
|
||||
</DropdownMenu.Item>
|
||||
</DropdownMenu.Content>
|
||||
</DropdownMenu.Portal>
|
||||
|
||||
12
src/pages/settings/index.tsx
Normal file
12
src/pages/settings/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { MainLayout } from "@components/layouts";
|
||||
import { type NextPage } from "next";
|
||||
|
||||
const Settings: NextPage = () => {
|
||||
return (
|
||||
<MainLayout>
|
||||
<h1 className="text-r-5xl font-bold text-primary">Settings</h1>
|
||||
</MainLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Settings;
|
||||
Reference in New Issue
Block a user