diff --git a/src/app/(dashboard)/app/_components/welcome-message.tsx b/src/app/(dashboard)/app/_components/welcome-message.tsx new file mode 100644 index 00000000..d23008ae --- /dev/null +++ b/src/app/(dashboard)/app/_components/welcome-message.tsx @@ -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 ( +
+

+ Good afternoon,{' '} + {user.firstName ?? user.emailAddresses[0]?.emailAddress.split('@')[0]}! +

+

+ “The final wisdom of life requires not the annulment of incongruity but + the achievement of serenity within and above it.” - Reinhold Niebuhr +

+
+ ); +} diff --git a/src/app/(dashboard)/app/page.tsx b/src/app/(dashboard)/app/page.tsx index 04a45731..20adafe6 100644 --- a/src/app/(dashboard)/app/page.tsx +++ b/src/app/(dashboard)/app/page.tsx @@ -1,15 +1,10 @@ +import { WelcomeMessage } from './_components/welcome-message'; + export default function DashboardHome() { return (
-
-

Good afternoon, Ahmed!

-

- “The final wisdom of life requires not the annulment of incongruity - but the achievement of serenity within and above it.” - Reinhold - Niebuhr -

-
+
More content
Right side