feat(notifications): add account-scoped inbox and persistent preferences
This commit is contained in:
1 parent
8f55ff2d17
commit
1eee6661f9
39 files changed
+1559
-3
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { count, eq, inArray } from "drizzle-orm";
|
||||
import Image from "next/image";
|
||||
import type { Session } from "next-auth";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { signOutAndRevokeTicket } from "@/actions/sessions";
|
||||
import { HeaderUserIdentity } from "@/components/header-user-identity";
|
||||
import Link from "@/components/link";
|
||||
@@ -53,6 +54,7 @@ function Currency({
|
||||
|
||||
export async function TopHeader({ session }: { session: Session | null }) {
|
||||
if (!session?.user?.id) return null;
|
||||
const notificationText = await getTranslations("pages.notifications");
|
||||
const id = Number(session.user.id);
|
||||
|
||||
let credits = 0;
|
||||
@@ -343,6 +345,13 @@ export async function TopHeader({ session }: { session: Session | null }) {
|
||||
>
|
||||
My profile
|
||||
</Link>
|
||||
<Link
|
||||
href="/notifications"
|
||||
className="dropdown-item"
|
||||
role="menuitem"
|
||||
>
|
||||
{notificationText("title")}
|
||||
</Link>
|
||||
<Link href="/settings" className="dropdown-item" role="menuitem">
|
||||
User settings
|
||||
</Link>
|
||||
|
||||
Reference in new issue
Block a user