mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-14 17:13:11 -07:00
feat: initialize Laravel project with React 19 starter kit (#2001)
* feat: initialize Laravel project with React 19 starter kit - Add Laravel backend with Inertia.js integration - Set up React 19 with TypeScript frontend - Configure shadcn/ui component library - Add Vite build tooling and development setup - Include authentication scaffolding with Inertia - Set up responsive layouts and UI components * Potential fix for code scanning alert no. 595: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
b8e47d569e
commit
dbbc31b519
163 changed files with 25318 additions and 24 deletions
36
resources/js/components/nav-user.tsx
Normal file
36
resources/js/components/nav-user.tsx
Normal file
|
@ -0,0 +1,36 @@
|
|||
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
|
||||
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from '@/components/ui/sidebar';
|
||||
import { UserInfo } from '@/components/user-info';
|
||||
import { UserMenuContent } from '@/components/user-menu-content';
|
||||
import { useIsMobile } from '@/hooks/use-mobile';
|
||||
import { type SharedData } from '@/types';
|
||||
import { usePage } from '@inertiajs/react';
|
||||
import { ChevronsUpDown } from 'lucide-react';
|
||||
|
||||
export function NavUser() {
|
||||
const { auth } = usePage<SharedData>().props;
|
||||
const { state } = useSidebar();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return (
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<SidebarMenuButton size="lg" className="group text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent">
|
||||
<UserInfo user={auth.user} />
|
||||
<ChevronsUpDown className="ml-auto size-4" />
|
||||
</SidebarMenuButton>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
className="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg"
|
||||
align="end"
|
||||
side={isMobile ? 'bottom' : state === 'collapsed' ? 'left' : 'bottom'}
|
||||
>
|
||||
<UserMenuContent user={auth.user} />
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue