mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
feat(ui): add clickable logo to redirect to homepage #95
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
|||||||
import { NavGroup } from '@/components/layout/nav-group'
|
import { NavGroup } from '@/components/layout/nav-group'
|
||||||
import Logo from '@/assets/logo.svg'
|
import Logo from '@/assets/logo.svg'
|
||||||
import { useSidebarData } from './data/sidebar-data'
|
import { useSidebarData } from './data/sidebar-data'
|
||||||
|
import { Link } from '@tanstack/react-router';
|
||||||
|
|
||||||
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||||
const { open } = useSidebar();
|
const { open } = useSidebar();
|
||||||
@@ -36,8 +37,10 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
size='lg'
|
size='lg'
|
||||||
|
asChild
|
||||||
className='data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground'
|
className='data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground'
|
||||||
>
|
>
|
||||||
|
<Link to="/">
|
||||||
<div className='flex aspect-square size-16 items-center justify-center rounded-lg text-sidebar-primary-foreground'>
|
<div className='flex aspect-square size-16 items-center justify-center rounded-lg text-sidebar-primary-foreground'>
|
||||||
<img
|
<img
|
||||||
className={open ? "relative ml-[12px] mr-[12px]" : "mr-[30px]"}
|
className={open ? "relative ml-[12px] mr-[12px]" : "mr-[30px]"}
|
||||||
@@ -52,6 +55,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
Bichon
|
Bichon
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</Link>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user