diff --git a/app/(browse)/_components/sidebar/following.tsx b/app/(browse)/_components/sidebar/following.tsx index 8c5e51a..0826995 100644 --- a/app/(browse)/_components/sidebar/following.tsx +++ b/app/(browse)/_components/sidebar/following.tsx @@ -2,7 +2,7 @@ import { useSidebar } from "@/store/use-sidebar"; import { Follow, User } from "@prisma/client"; -import { UserItem } from "./user-item"; +import { UserItem, UserItemSkeleton } from "./user-item"; interface FollowingProps { data: (Follow & { following: User })[]; @@ -35,3 +35,13 @@ export const Following = ({ data }: FollowingProps) => { ); }; + +export const FollowingSkeleton = () => { + return ( + + ); +}; diff --git a/app/(browse)/_components/sidebar/index.tsx b/app/(browse)/_components/sidebar/index.tsx index f8737b2..b96ee78 100644 --- a/app/(browse)/_components/sidebar/index.tsx +++ b/app/(browse)/_components/sidebar/index.tsx @@ -3,7 +3,7 @@ import { Recommended, RecommendedSkeleton } from "./recommended"; import { Toggle, ToggleSkeleton } from "./toggle"; import { Wrapper } from "./wrapper"; import { getFollowedUsers } from "@/lib/follow-service"; -import { Following } from "./following"; +import { Following, FollowingSkeleton } from "./following"; export const Sidebar = async () => { const recommended = await getRecommended(); @@ -13,8 +13,8 @@ export const Sidebar = async () => {
- +
); @@ -24,6 +24,7 @@ export const SidebarSkeleton = () => { return ( ); diff --git a/app/(browse)/_components/sidebar/wrapper.tsx b/app/(browse)/_components/sidebar/wrapper.tsx index 0b202eb..c0a22ae 100644 --- a/app/(browse)/_components/sidebar/wrapper.tsx +++ b/app/(browse)/_components/sidebar/wrapper.tsx @@ -6,6 +6,7 @@ import React from "react"; import { useIsClient } from "usehooks-ts"; import { RecommendedSkeleton } from "./recommended"; import { ToggleSkeleton } from "./toggle"; +import { FollowingSkeleton } from "./following"; interface WrapperProps { children: React.ReactNode; @@ -19,6 +20,7 @@ export const Wrapper = ({ children }: WrapperProps) => { return ( );