feat: Implement core application structure with new dashboard, settings, and help pages, and enhance opportunities management with persistence and filtering.
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import Link from "next/link"
|
||||
import { usePathname } from "next/navigation"
|
||||
import {
|
||||
Command,
|
||||
Frame,
|
||||
HelpCircle,
|
||||
Settings2,
|
||||
Terminal,
|
||||
Target,
|
||||
Plus
|
||||
} from "lucide-react"
|
||||
|
||||
@@ -26,11 +30,12 @@ import { useQuery, useMutation } from "convex/react"
|
||||
import { api } from "@/convex/_generated/api"
|
||||
import { Checkbox } from "@/components/ui/checkbox"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { useProject } from "@/components/project-context"
|
||||
|
||||
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||
const pathname = usePathname()
|
||||
const projects = useQuery(api.projects.getProjects);
|
||||
const [selectedProjectId, setSelectedProjectId] = React.useState<string | null>(null);
|
||||
const { selectedProjectId, setSelectedProjectId } = useProject();
|
||||
|
||||
// Set default selected project
|
||||
React.useEffect(() => {
|
||||
@@ -87,15 +92,51 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||
<SidebarGroupContent>
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton tooltip="Dashboard" isActive>
|
||||
<Terminal />
|
||||
<span>Dashboard</span>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
tooltip="Dashboard"
|
||||
isActive={pathname === "/dashboard"}
|
||||
>
|
||||
<Link href="/dashboard">
|
||||
<Terminal />
|
||||
<span>Dashboard</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton tooltip="Settings">
|
||||
<Settings2 />
|
||||
<span>Settings</span>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
tooltip="Opportunities"
|
||||
isActive={pathname === "/opportunities"}
|
||||
>
|
||||
<Link href="/opportunities">
|
||||
<Target />
|
||||
<span>Opportunities</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
tooltip="Settings"
|
||||
isActive={pathname === "/settings"}
|
||||
>
|
||||
<Link href="/settings">
|
||||
<Settings2 />
|
||||
<span>Settings</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
tooltip="Help"
|
||||
isActive={pathname === "/help"}
|
||||
>
|
||||
<Link href="/help">
|
||||
<HelpCircle />
|
||||
<span>Help</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
|
||||
Reference in New Issue
Block a user