Formated Files

This commit is contained in:
Ahmad 2024-02-15 20:49:19 -05:00
parent d5631b309a
commit e768d9181f
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
138 changed files with 1829 additions and 1851 deletions

View file

@ -1,17 +1,17 @@
"use client";
'use client';
import Image from "next/image";
import { Activity, CreditCard, Layout, Settings } from "lucide-react";
import { usePathname, useRouter } from "next/navigation";
import Image from 'next/image';
import { Activity, CreditCard, Layout, Settings } from 'lucide-react';
import { usePathname, useRouter } from 'next/navigation';
import {
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
} from '@/components/ui/accordion';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { Skeleton } from '@/components/ui/skeleton';
export type Organization = {
id: string;
@ -38,23 +38,23 @@ export const NavItem = ({
const routes = [
{
label: "Boards",
icon: <Layout className="h-4 w-4 mr-2" />,
label: 'Boards',
icon: <Layout className='mr-2 h-4 w-4' />,
href: `/organization/${organization.id}`,
},
{
label: "Activity",
icon: <Activity className="h-4 w-4 mr-2" />,
label: 'Activity',
icon: <Activity className='mr-2 h-4 w-4' />,
href: `/organization/${organization.id}/activity`,
},
{
label: "Settings",
icon: <Settings className="h-4 w-4 mr-2" />,
label: 'Settings',
icon: <Settings className='mr-2 h-4 w-4' />,
href: `/organization/${organization.id}/settings`,
},
{
label: "Billing",
icon: <CreditCard className="h-4 w-4 mr-2" />,
label: 'Billing',
icon: <CreditCard className='mr-2 h-4 w-4' />,
href: `/organization/${organization.id}/billing`,
},
];
@ -64,37 +64,37 @@ export const NavItem = ({
};
return (
<AccordionItem value={organization.id} className="border-none">
<AccordionItem value={organization.id} className='border-none'>
<AccordionTrigger
onClick={() => onExpand(organization.id)}
className={cn(
"flex items-center gap-x-2 p-1.5 text-neutral-700 rounded-md hover:bg-neutral-500/10 transition text-start no-underline hover:no-underline",
isActive && !isExpanded && "bg-sky-500/10 text-sky-700"
'flex items-center gap-x-2 rounded-md p-1.5 text-start text-neutral-700 no-underline transition hover:bg-neutral-500/10 hover:no-underline',
isActive && !isExpanded && 'bg-sky-500/10 text-sky-700'
)}
>
<div className="flex items-center gap-x-2">
<div className="w-7 h-7 relative">
<div className='flex items-center gap-x-2'>
<div className='relative h-7 w-7'>
<Image
fill
src={organization.imageUrl}
alt={organization.name}
className="rounded-sm object-cover"
className='rounded-sm object-cover'
/>
</div>
<span className="font-medium text-sm">{organization.name}</span>
<span className='text-sm font-medium'>{organization.name}</span>
</div>
</AccordionTrigger>
<AccordionContent className="pt-1 text-neutral-700">
<AccordionContent className='pt-1 text-neutral-700'>
{routes.map((route) => (
<Button
key={route.href}
size="sm"
size='sm'
onClick={() => onClick(route.href)}
className={cn(
"w-full font-normal justify-start pl-10 mb-1",
pathname === route.href && "bg-sky-500/10 text-sky-700"
'mb-1 w-full justify-start pl-10 font-normal',
pathname === route.href && 'bg-sky-500/10 text-sky-700'
)}
variant="ghost"
variant='ghost'
>
{route.icon}
{route.label}
@ -107,11 +107,11 @@ export const NavItem = ({
NavItem.Skeleton = function SkeletonNavItem() {
return (
<div className="flex items-center gap-x-2">
<div className="w-10 h-10 relative shrink-0">
<Skeleton className="h-full w-full absolute" />
<div className='flex items-center gap-x-2'>
<div className='relative h-10 w-10 shrink-0'>
<Skeleton className='absolute h-full w-full' />
</div>
<Skeleton className="h-4 w-full" />
<Skeleton className='h-4 w-full' />
</div>
);
};