Skip to content

Commit b05d0f7

Browse files
authored
Merge pull request #30 from mscode07/dev
working on Docker compose
2 parents 313ba82 + 51ca310 commit b05d0f7

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

apps/X/app/lib/auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ declare module "next-auth" {
1313
name?: string | null;
1414
email?: string | null;
1515
image?: string | null;
16+
username?: string | null;
1617
};
1718
}
1819
}

apps/X/src/components/ui/TweetComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ export const TweetComp = ({ tweet }: TweetProps) => {
8484
</div>
8585
<div className="flex flex-col">
8686
<div className="list-inside">{tweet.content}</div>
87-
<div className="cursor-pointer">Image Part</div>
87+
{/* <div className="cursor-pointer">Image Part</div> */}
8888
</div>
89-
<div className="flex space-x-24 text-slate-600">
89+
<div className="flex space-x-24 text-slate-600 mt-5">
9090
<FaRegComment className="cursor-pointer" />
9191
<BiRepost className="cursor-pointer" />
9292
<FiHeart className="cursor-pointer" />

apps/X/src/components/ui/home/HomeLeft.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use client";
22

3-
import { getSession } from "next-auth/react";
43
import Link from "next/link";
54
import { useRouter } from "next/navigation";
65
import { AiOutlineThunderbolt } from "react-icons/ai";
@@ -15,15 +14,16 @@ import { TbOctagonPlus } from "react-icons/tb";
1514
import { Button, UserAvatar, X_logo } from "..";
1615
import GrokIcon from "../Grok";
1716
import X_Icon from "../X_Icon";
17+
import { useSession } from "next-auth/react";
18+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
1819

1920
export const HomeLeft = () => {
2021
const router = useRouter();
21-
const session = getSession();
22+
const { data: session } = useSession();
2223

2324
const onPostClick = () => {
2425
console.log("Click");
2526
router.push("/post");
26-
console.log(session, "This is the session");
2727
};
2828
return (
2929
<div>
@@ -143,15 +143,20 @@ export const HomeLeft = () => {
143143
</div>
144144
<div className="mt-28">
145145
<div className="flex gap-2">
146-
<UserAvatar />
146+
<Avatar>
147+
<AvatarImage src={session?.user?.image || ''} alt={session?.user?.name || 'User'} />
148+
<AvatarFallback>{session?.user?.name?.[0]}</AvatarFallback>
149+
</Avatar>
147150
<div>
148-
<p className="font-bold">mscode</p>
149-
<p className="text-slate-600 font-semibold">@mscode07</p>
151+
<p className="font-bold">{session?.user?.name}</p>
152+
<p className="text-slate-600 font-semibold">
153+
@{session?.user?.username}
154+
</p>
150155
</div>
151156
</div>
152157
</div>
153158
</div>
154-
</div>
159+
</div>
155160
</div>
156161
</div>
157162
);

0 commit comments

Comments
 (0)