mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 13:26:41 +00:00
use display name function
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { verifySession } from "@app/lib/auth/verifySession";
|
||||
import { redirect } from "next/navigation";
|
||||
import DeviceLoginForm from "@/components/DeviceLoginForm";
|
||||
import { getUserDisplayName } from "@app/lib/getUserDisplayName";
|
||||
import { cache } from "react";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -24,7 +25,12 @@ export default async function DeviceLoginPage({ searchParams }: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const userName = user?.name || user?.username || "";
|
||||
const userName = user
|
||||
? getUserDisplayName({
|
||||
name: user.name,
|
||||
username: user.username
|
||||
})
|
||||
: "";
|
||||
|
||||
return (
|
||||
<DeviceLoginForm
|
||||
|
||||
Reference in New Issue
Block a user