-
-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dashboard welcomes user by their name (#375)
* feat: add welcome name * refactor: move welcome msg to comp
- Loading branch information
Showing
2 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use client'; | ||
|
||
import { useUser } from '@clerk/nextjs'; | ||
|
||
export function WelcomeMessage() { | ||
const { user } = useUser(); | ||
|
||
if (user === null || user === undefined) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className="space-y-3"> | ||
<h1 className="text-4xl font-semibold"> | ||
Good afternoon,{' '} | ||
{user.firstName ?? user.emailAddresses[0]?.emailAddress.split('@')[0]}! | ||
</h1> | ||
<p className="max-w-prose text-balance text-sm leading-6 text-foreground-muted"> | ||
“The final wisdom of life requires not the annulment of incongruity but | ||
the achievement of serenity within and above it.” - Reinhold Niebuhr | ||
</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters