Skip to content

Commit

Permalink
Add updatProfile component to dashboard/settings + update docs link
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Mar 21, 2024
1 parent df00ce7 commit 64518b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
23 changes: 12 additions & 11 deletions src/app/dashboard/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import type { Metadata } from "next";

import { auth, signOut } from "@/auth";
import { auth } from "@/auth";
import UpdateNameAvatar from "@/components/settings/update-name-avatar";

export const metadata: Metadata = {
title: "Settings - Dashboard",
};

const SettingsPage = async () => {
const session = await auth();

if (!session) return null;

return (
<main className="animate-in duration-500 slide-in-from-bottom-2 fade-in-5">
{JSON.stringify(session)}
<form
action={async () => {
"use server";
await signOut();
}}
>
<button>Sign Out</button>
</form>
<main className="duration-500 animate-in fade-in-5 slide-in-from-bottom-2">
<UpdateNameAvatar
name={session.user.name!}
username={session.user.username!}
email={session.user.email!}
avatar={session.user.image!}
/>
</main>
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/commandK/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Pages = [

export const Documentation = [
{
name: "Getting Started",
name: "Docs: Getting Started",
href: "/docs/getting-started",
icon: RocketIcon,
},
Expand All @@ -55,7 +55,7 @@ export const ChangeTheme = [

export const SocialPages = [
{
name: "X (Twitter)",
name: "X (Formerly Twitter)",
href: "https://twitter.com/pheralb_",
icon: XLogo,
},
Expand Down

0 comments on commit 64518b8

Please sign in to comment.