diff --git a/app/settings/components/divider.tsx b/app/settings/components/divider.tsx index 8c78520..c87a54c 100644 --- a/app/settings/components/divider.tsx +++ b/app/settings/components/divider.tsx @@ -1,6 +1,8 @@ -export default function Divider() { +import clsx from "clsx"; + +export default function Divider({ className = "" }) { return ( -
+
diff --git a/app/settings/components/settings-layout.tsx b/app/settings/components/settings-layout.tsx index 9c05277..23b81b4 100644 --- a/app/settings/components/settings-layout.tsx +++ b/app/settings/components/settings-layout.tsx @@ -1,9 +1,17 @@ import type { FunctionComponent } from "react"; -import { Link, Routes, useRouter } from "blitz"; +import { Link, Routes, useMutation, useRouter } from "blitz"; import clsx from "clsx"; -import { IoChevronBack, IoNotificationsOutline, IoCardOutline, IoPersonCircleOutline } from "react-icons/io5"; +import { + IoChevronBack, + IoLogOutOutline, + IoNotificationsOutline, + IoCardOutline, + IoPersonCircleOutline, +} from "react-icons/io5"; -import Layout from "../../core/layouts/layout"; +import Layout from "app/core/layouts/layout"; +import logout from "app/auth/mutations/logout"; +import Divider from "./divider"; const subNavigation = [ { name: "Account", href: Routes.Account(), icon: IoPersonCircleOutline }, @@ -13,6 +21,7 @@ const subNavigation = [ const SettingsLayout: FunctionComponent = ({ children }) => { const router = useRouter(); + const [logoutMutation] = useMutation(logout); return ( @@ -27,7 +36,7 @@ const SettingsLayout: FunctionComponent = ({ children }) => {