diff --git a/src/app/dashboard/settings/page.tsx b/src/app/dashboard/settings/page.tsx index 1ff856cc..e951974b 100644 --- a/src/app/dashboard/settings/page.tsx +++ b/src/app/dashboard/settings/page.tsx @@ -6,6 +6,7 @@ import { redirect, useSearchParams } from "next/navigation"; import { useHeatmapTheme } from "@/hooks/useHeatmapTheme"; import PrivacySettings from "@/components/PrivacySettings"; import { toast } from "sonner"; +import Link from "next/link"; interface UserSettings { id: string; @@ -118,16 +119,13 @@ function SettingsPageContent() { const statusMessage = useMemo( () => - getStatusMessage( - searchParams.get("success"), - searchParams.get("error") - ), + getStatusMessage(searchParams.get("success"), searchParams.get("error")), [searchParams] ); const { theme, setTheme } = useHeatmapTheme(); - // Redirect to signin if not authenticated + // Redirect to signin if not authenticated useEffect(() => { if (status === "unauthenticated") { redirect("/"); @@ -234,13 +232,16 @@ function SettingsPageContent() { const copyShareLink = () => { if (!settings) return; const link = `${window.location.origin}/u/${settings.github_login}`; - navigator.clipboard.writeText(link).then(() => { - setCopied(true); - toast.success("Link copied successfully!"); - setTimeout(() => setCopied(false), 2000); - }).catch(() => { - toast.error("Failed to copy link"); - }); + navigator.clipboard + .writeText(link) + .then(() => { + setCopied(true); + toast.success("Link copied successfully!"); + setTimeout(() => setCopied(false), 2000); + }) + .catch(() => { + toast.error("Failed to copy link"); + }); }; const handleRemoveAccount = async (githubId: string) => { @@ -303,13 +304,25 @@ function SettingsPageContent() { return (
-
-

- Settings -

-

- Manage your profile and preferences -

+
+ + + +
+

+ Settings +

+

+ Manage your profile and preferences +

+
{statusMessage && ( @@ -550,6 +563,16 @@ function SettingsPageContent() {
+
+ + + +
);