diff --git a/thoughts-frontend/app/page.tsx b/thoughts-frontend/app/page.tsx
index ebac652..a4dc23a 100644
--- a/thoughts-frontend/app/page.tsx
+++ b/thoughts-frontend/app/page.tsx
@@ -1,12 +1,6 @@
import type { Metadata } from "next";
import { cookies } from "next/headers";
-import {
- getFeed,
- getFriends,
- getMe,
- getTopFriends,
- Me,
-} from "@/lib/api";
+import { getFeed, getMe, Me } from "@/lib/api";
import { ThoughtForm } from "@/components/thought-form";
import { EmptyState } from "@/components/empty-state";
import { Button } from "@/components/ui/button";
@@ -16,9 +10,10 @@ import { ThoughtThread } from "@/components/thought-thread";
import { buildThoughtThreads } from "@/lib/utils";
import { TopFriends } from "@/components/top-friends";
import { UsersCount } from "@/components/users-count";
-
import { PaginationNav } from "@/components/pagination-nav";
import { redirect } from "next/navigation";
+import { Suspense } from "react";
+import { ProfileSkeleton, TagsSkeleton, CountSkeleton } from "@/components/loading-skeleton";
export const metadata: Metadata = {
title: "Home",
@@ -61,18 +56,26 @@ async function FeedPage({
const { items: allThoughts, totalPages } = feedData!;
const thoughtThreads = buildThoughtThreads(allThoughts);
- const friends = (await getFriends(token)).users.map((user) => user.username);
- const topFriendsData = me
- ? await getTopFriends(me.username, token).catch(() => ({ topFriends: [] }))
- : { topFriends: [] };
- const shouldDisplayTopFriends = topFriendsData.topFriends.length > 0;
+ const sidebar = (
+ <>
+