diff --git a/app/(browse)/_components/sidebar/toggle.tsx b/app/(browse)/_components/sidebar/toggle.tsx
index 5bb2386..8ae8ef8 100644
--- a/app/(browse)/_components/sidebar/toggle.tsx
+++ b/app/(browse)/_components/sidebar/toggle.tsx
@@ -2,6 +2,7 @@
import { Hint } from "@/components/hint";
import { Button } from "@/components/ui/button";
+import { Skeleton } from "@/components/ui/skeleton";
import { useSidebar } from "@/store/use-sidebar";
import { ArrowLeftFromLine, ArrowRightFromLine } from "lucide-react";
@@ -38,3 +39,12 @@ export const Toggle = () => {
>
);
};
+
+export const ToggleSkeleton = () => {
+ return (
+
+
+
+
+ );
+};
diff --git a/app/(browse)/_components/sidebar/wrapper.tsx b/app/(browse)/_components/sidebar/wrapper.tsx
index f383ef0..0b202eb 100644
--- a/app/(browse)/_components/sidebar/wrapper.tsx
+++ b/app/(browse)/_components/sidebar/wrapper.tsx
@@ -3,14 +3,27 @@
import { cn } from "@/lib/utils";
import { useSidebar } from "@/store/use-sidebar";
import React from "react";
+import { useIsClient } from "usehooks-ts";
+import { RecommendedSkeleton } from "./recommended";
+import { ToggleSkeleton } from "./toggle";
interface WrapperProps {
children: React.ReactNode;
}
export const Wrapper = ({ children }: WrapperProps) => {
+ const isClient = useIsClient();
const { collapsed } = useSidebar((state) => state);
+ if (!isClient) {
+ return (
+
+ );
+ }
+
return (