diff --git a/thoughts-frontend/app/(auth)/layout.tsx b/thoughts-frontend/app/(auth)/layout.tsx index 4867b37..d948319 100644 --- a/thoughts-frontend/app/(auth)/layout.tsx +++ b/thoughts-frontend/app/(auth)/layout.tsx @@ -5,7 +5,7 @@ export default function AuthLayout({ children: React.ReactNode; }) { return ( -
+
{children}
); diff --git a/thoughts-frontend/app/page.tsx b/thoughts-frontend/app/page.tsx index a00fce5..7a0b476 100644 --- a/thoughts-frontend/app/page.tsx +++ b/thoughts-frontend/app/page.tsx @@ -1,5 +1,12 @@ import { cookies } from "next/headers"; -import { getFeed, getMe, getUserProfile, Me, User } from "@/lib/api"; +import { + getFeed, + getFriends, + getMe, + getUserProfile, + Me, + User, +} from "@/lib/api"; import { PostThoughtForm } from "@/components/post-thought-form"; import { Button } from "@/components/ui/button"; import Link from "next/link"; @@ -39,11 +46,14 @@ async function FeedPage({ token }: { token: string }) { feedData.thoughts ); + const friends = (await getFriends(token)).users.map((user) => user.username); + const shouldDisplayTopFriends = me?.topFriends && me.topFriends.length > 8; + return (
diff --git a/thoughts-frontend/components/header.tsx b/thoughts-frontend/components/header.tsx index ced419c..020b080 100644 --- a/thoughts-frontend/components/header.tsx +++ b/thoughts-frontend/components/header.tsx @@ -25,7 +25,7 @@ export function Header() { ) : ( <> -