+
+
+
+
+
{children}
diff --git a/components/dashboardComponents/AppSidebar.tsx b/components/dashboardComponents/AppSidebar.tsx
index 32c5b8d..aab6434 100644
--- a/components/dashboardComponents/AppSidebar.tsx
+++ b/components/dashboardComponents/AppSidebar.tsx
@@ -5,42 +5,15 @@ import {
Moon,
Sun,
LogOut,
- User,
- Settings,
- BookA,
- FileQuestion,
ChevronRight,
ChevronLeft,
} from "lucide-react";
import { useTheme } from "next-themes";
import { usePathname } from "next/navigation";
import Link from "next/link";
-
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
-
-const SidebarData = [
- {
- title: "Profile",
- icon: User,
- href: "/dashboard/profile",
- },
- {
- title: "Problems",
- icon: FileQuestion,
- href: "/dashboard/problems",
- },
- {
- title: "Journal",
- icon: BookA,
- href: "/dashboard/journal",
- },
- {
- title: "Settings",
- icon: Settings,
- href: "/dashboard/settings",
- },
-];
+import { SidebarData } from "@/data/SidebarData";
export function AppSidebar() {
const { setTheme, theme } = useTheme();
diff --git a/components/dashboardComponents/MobileSidebar.tsx b/components/dashboardComponents/MobileSidebar.tsx
new file mode 100644
index 0000000..d057b4c
--- /dev/null
+++ b/components/dashboardComponents/MobileSidebar.tsx
@@ -0,0 +1,99 @@
+"use client";
+
+import React from "react";
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetFooter,
+ SheetHeader,
+ SheetTitle,
+ SheetTrigger,
+} from "../ui/sheet";
+import { Button } from "../ui/button";
+import {
+ BookA,
+ FileQuestion,
+ Github,
+ Menu,
+ Settings,
+ User,
+} from "lucide-react";
+import { useTheme } from "next-themes";
+import { usePathname } from "next/navigation";
+import Link from "next/link";
+import { cn } from "@/lib/utils";
+import { SidebarData } from "@/data/SidebarData";
+import { signout } from "@/app/actions/action";
+
+export default function MobileSidear() {
+ const { setTheme, theme } = useTheme();
+ const pathname = usePathname();
+
+ const toggleTheme = () => {
+ setTheme(theme === "dark" ? "light" : "dark");
+ };
+ return (
+
+
+
+
+
+
+
+
+ LeetCode Journal.
+
+
+ Your personal coding companion.
+
+
+
+
+ {/* */}
+
+
+
+
+
+
+ );
+}
diff --git a/data/SidebarData.ts b/data/SidebarData.ts
new file mode 100644
index 0000000..50d6c6a
--- /dev/null
+++ b/data/SidebarData.ts
@@ -0,0 +1,24 @@
+import { BookA, FileQuestion, Settings, User } from "lucide-react";
+
+export const SidebarData = [
+ {
+ title: "Profile",
+ icon: User,
+ href: "/dashboard/profile",
+ },
+ {
+ title: "Problems",
+ icon: FileQuestion,
+ href: "/dashboard/problems",
+ },
+ {
+ title: "Journal",
+ icon: BookA,
+ href: "/dashboard/journal",
+ },
+ {
+ title: "Settings",
+ icon: Settings,
+ href: "/dashboard/settings",
+ },
+];
From 0e55d748a441e2dbbd6f9ff2254be92a284512d8 Mon Sep 17 00:00:00 2001
From: "HanuCh@udhary" <137854084+hanuchaudhary@users.noreply.github.com>
Date: Wed, 15 Jan 2025 19:25:47 +0530
Subject: [PATCH 4/4] changes
---
components/dashboardComponents/MobileSidebar.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/dashboardComponents/MobileSidebar.tsx b/components/dashboardComponents/MobileSidebar.tsx
index d057b4c..59f7c50 100644
--- a/components/dashboardComponents/MobileSidebar.tsx
+++ b/components/dashboardComponents/MobileSidebar.tsx
@@ -36,9 +36,9 @@ export default function MobileSidear() {
return (
-