mobile: add explicit close button to nav drawer
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { NavLink, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { ChevronRight, ExternalLink, Folder, MessageSquare, Plus, Settings as SettingsIcon } from 'lucide-react';
|
||||
import { ChevronRight, ExternalLink, Folder, MessageSquare, Plus, Settings as SettingsIcon, X } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { sessionEvents } from '@/hooks/sessionEvents';
|
||||
@@ -221,9 +221,21 @@ export function ProjectSidebar() {
|
||||
<NavLink to="/" className="font-semibold tracking-tight text-base">
|
||||
BooCode
|
||||
</NavLink>
|
||||
<Button size="icon-sm" variant="ghost" onClick={() => setAddOpen(true)} aria-label="Add project">
|
||||
<Plus />
|
||||
</Button>
|
||||
<div className="flex items-center gap-1">
|
||||
<Button size="icon-sm" variant="ghost" onClick={() => setAddOpen(true)} aria-label="Add project">
|
||||
<Plus />
|
||||
</Button>
|
||||
{isMobile && (
|
||||
<Button
|
||||
size="icon-sm"
|
||||
variant="ghost"
|
||||
onClick={() => setDrawerOpen(false)}
|
||||
aria-label="Close sidebar"
|
||||
>
|
||||
<X />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{isMobile && (pull.pullDist > 0 || pull.refreshing) && (
|
||||
|
||||
Reference in New Issue
Block a user