mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 12:52:39 +02:00
Merge pull request #449 from msinha569/fix/sidebar-issue
Fix: make entire sidebar button clickable (#445)
This commit is contained in:
commit
deeae5e62d
1 changed files with 19 additions and 9 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import Link from "next/link";
|
||||||
|
import Image from "next/image";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlertCircle,
|
AlertCircle,
|
||||||
BookOpen,
|
BookOpen,
|
||||||
|
|
@ -33,6 +36,7 @@ import {
|
||||||
SidebarMenuItem,
|
SidebarMenuItem,
|
||||||
} from "@/components/ui/sidebar";
|
} from "@/components/ui/sidebar";
|
||||||
|
|
||||||
|
|
||||||
// Map of icon names to their components
|
// Map of icon names to their components
|
||||||
export const iconMap: Record<string, LucideIcon> = {
|
export const iconMap: Record<string, LucideIcon> = {
|
||||||
BookOpen,
|
BookOpen,
|
||||||
|
|
@ -213,16 +217,22 @@ export const AppSidebar = memo(function AppSidebar({
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton size="lg" asChild aria-label="Go to home page">
|
<SidebarMenuButton asChild size="lg">
|
||||||
<div>
|
<Link href="/" className="flex items-center gap-2 w-full">
|
||||||
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
|
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
|
||||||
<Logo className="rounded-lg" />
|
<Image
|
||||||
</div>
|
src="/icon-128.png"
|
||||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
alt="SurfSense logo"
|
||||||
<span className="truncate font-medium">SurfSense</span>
|
width={32}
|
||||||
<span className="truncate text-xs">beta v0.0.8</span>
|
height={32}
|
||||||
</div>
|
className="rounded-lg"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||||
|
<span className="truncate font-medium">SurfSense</span>
|
||||||
|
<span className="truncate text-xs">beta v0.0.8</span>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue