diff --git a/apps/X/app/lib/auth.ts b/apps/X/app/lib/auth.ts index aee4889..e70cd25 100644 --- a/apps/X/app/lib/auth.ts +++ b/apps/X/app/lib/auth.ts @@ -13,6 +13,7 @@ declare module "next-auth" { name?: string | null; email?: string | null; image?: string | null; + username?: string | null; }; } } diff --git a/apps/X/src/components/ui/TweetComp.tsx b/apps/X/src/components/ui/TweetComp.tsx index 0309f4c..a481a5b 100644 --- a/apps/X/src/components/ui/TweetComp.tsx +++ b/apps/X/src/components/ui/TweetComp.tsx @@ -84,9 +84,9 @@ export const TweetComp = ({ tweet }: TweetProps) => {
{tweet.content}
-
Image Part
+ {/*
Image Part
*/}
-
+
diff --git a/apps/X/src/components/ui/home/HomeLeft.tsx b/apps/X/src/components/ui/home/HomeLeft.tsx index cdccd9b..07ff8f1 100644 --- a/apps/X/src/components/ui/home/HomeLeft.tsx +++ b/apps/X/src/components/ui/home/HomeLeft.tsx @@ -1,6 +1,5 @@ "use client"; -import { getSession } from "next-auth/react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { AiOutlineThunderbolt } from "react-icons/ai"; @@ -15,15 +14,16 @@ import { TbOctagonPlus } from "react-icons/tb"; import { Button, UserAvatar, X_logo } from ".."; import GrokIcon from "../Grok"; import X_Icon from "../X_Icon"; +import { useSession } from "next-auth/react"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; export const HomeLeft = () => { const router = useRouter(); - const session = getSession(); + const { data: session } = useSession(); const onPostClick = () => { console.log("Click"); router.push("/post"); - console.log(session, "This is the session"); }; return (
@@ -143,15 +143,20 @@ export const HomeLeft = () => {
- + + + {session?.user?.name?.[0]} +
-

mscode

-

@mscode07

+

{session?.user?.name}

+

+ @{session?.user?.username} +

-
+ );