From ab330c64eeed9edfc2a6ef6a6f5cd38587ba0996 Mon Sep 17 00:00:00 2001 From: l3wdfut4pwr Date: Mon, 27 Apr 2026 13:45:25 +0300 Subject: add username change and logout --- src/app/profile/AccountButton.tsx | 17 +++++++++++++++++ src/app/profile/[username]/page.tsx | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/app/profile/AccountButton.tsx (limited to 'src/app') diff --git a/src/app/profile/AccountButton.tsx b/src/app/profile/AccountButton.tsx new file mode 100644 index 0000000..6eb0519 --- /dev/null +++ b/src/app/profile/AccountButton.tsx @@ -0,0 +1,17 @@ +'use client'; + +import Link from 'next/link'; +import { Button } from '@/components/ui'; +import { useUser } from '@/lib/contexts/Auth.context'; + +export default function AccountButton() { + const user = useUser(); + + if (!user) return null; + + return ( + + ); +} diff --git a/src/app/profile/[username]/page.tsx b/src/app/profile/[username]/page.tsx index ea13b36..cb79b7b 100644 --- a/src/app/profile/[username]/page.tsx +++ b/src/app/profile/[username]/page.tsx @@ -1,4 +1,4 @@ -import AccountButton from '@/components/settings/AccountButton'; +import AccountButton from '../AccountButton'; import { getUserByUsername } from '@/lib/api/user'; import { User } from '@/lib/contexts/Auth.context'; -- cgit v1.3-3-g829e