Oops
This commit is contained in:
parent
5f8598afaf
commit
c8e578f350
4 changed files with 7 additions and 3 deletions
|
@ -74,7 +74,7 @@ const VoteUI = () => {
|
||||||
const [presenceData] = usePresence<PresenceItem>(
|
const [presenceData] = usePresence<PresenceItem>(
|
||||||
`${env.NEXT_PUBLIC_APP_ENV}-${roomId}`,
|
`${env.NEXT_PUBLIC_APP_ENV}-${roomId}`,
|
||||||
{
|
{
|
||||||
name: `${user?.firstName} ${user?.lastName}` || "",
|
name: (user?.fullName ?? user?.username) || "",
|
||||||
image: user?.imageUrl || "",
|
image: user?.imageUrl || "",
|
||||||
client_id: user?.id || "unknown",
|
client_id: user?.id || "unknown",
|
||||||
isAdmin: isAdmin(user?.publicMetadata),
|
isAdmin: isAdmin(user?.publicMetadata),
|
||||||
|
|
5
src/app/dashboard/loading.tsx
Normal file
5
src/app/dashboard/loading.tsx
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import LoadingIndicator from "@/app/_components/LoadingIndicator";
|
||||||
|
|
||||||
|
export default function Loading() {
|
||||||
|
return <LoadingIndicator />;
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ export default async function Dashboard() {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col text-center items-center justify-center px-4 py-16 gap-4">
|
<div className="flex flex-col text-center items-center justify-center px-4 py-16 gap-4">
|
||||||
<h1 className="flex flex-row flex-wrap text-center justify-center items-center gap-1 text-4xl font-bold mx-auto">
|
<h1 className="flex flex-row flex-wrap text-center justify-center items-center gap-1 text-4xl font-bold mx-auto">
|
||||||
Hi, {user?.firstName}!{" "}
|
Hi, {user?.firstName ?? user?.username}!{" "}
|
||||||
{isAdmin(user?.publicMetadata) && (
|
{isAdmin(user?.publicMetadata) && (
|
||||||
<FaShieldAlt className="inline-block text-primary" />
|
<FaShieldAlt className="inline-block text-primary" />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import LoadingIndicator from "@/app/_components/LoadingIndicator";
|
import LoadingIndicator from "@/app/_components/LoadingIndicator";
|
||||||
|
|
||||||
export default function Loading() {
|
export default function Loading() {
|
||||||
// You can add any UI inside Loading, including a Skeleton.
|
|
||||||
return <LoadingIndicator />;
|
return <LoadingIndicator />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue