fix: update import path for route types in TypeScript environment file

This commit is contained in:
poyrazavsever
2026-06-05 09:37:04 +03:00
parent e933921cea
commit a341f1f69f
2 changed files with 48 additions and 36 deletions
+47 -35
View File
@@ -48,7 +48,7 @@ export function DashboardShell({ children, user }: DashboardShellProps) {
return ( return (
<div className="min-h-screen bg-background text-foreground"> <div className="min-h-screen bg-background text-foreground">
<div className="flex min-h-screen"> <div className="flex min-h-screen">
<aside className="hidden h-dvh w-[280px] shrink-0 border-r border-border bg-background lg:block"> <aside className="sticky top-0 hidden h-dvh w-[280px] shrink-0 self-start border-r border-border bg-background lg:block">
<AppSidebar pathname={pathname} user={user} /> <AppSidebar pathname={pathname} user={user} />
</aside> </aside>
@@ -114,7 +114,7 @@ function AppSidebar({
variant="bordered" variant="bordered"
className="flex h-dvh max-h-dvh flex-col overflow-hidden rounded-none border-0" className="flex h-dvh max-h-dvh flex-col overflow-hidden rounded-none border-0"
> >
<SidebarHeader className="shrink-0"> <SidebarHeader className="shrink-0 border-b-0 px-6 py-6">
<SidebarBranding <SidebarBranding
title="Cognis" title="Cognis"
subtitle="Freelancer OS" subtitle="Freelancer OS"
@@ -131,44 +131,51 @@ function AppSidebar({
/> />
</SidebarHeader> </SidebarHeader>
<SidebarContent className="tiny-scrollbar min-h-0 flex-1 overflow-y-auto"> <SidebarSeparator className="mx-0 my-0 w-full" />
{sidebarData.map((group) => (
<SidebarSection key={group.title} title={group.title} defaultOpen>
<SidebarMenu>
{group.items.map((item) => {
const isActive =
item.href === "/"
? pathname === "/"
: item.href
? pathname === item.href || pathname.startsWith(item.href + "/")
: false;
const Icon = item.icon;
return ( <SidebarContent className="tiny-scrollbar min-h-0 flex-1 overflow-y-auto px-6 py-6">
<SidebarMenuItem {sidebarData.map((group, groupIndex) => (
key={item.href || item.title} <div key={group.title}>
active={isActive} <SidebarSection title={group.title} defaultOpen className="mb-0">
icon={Icon ? <Icon className="h-4 w-4" /> : undefined} <SidebarMenu>
className={cn(isActive && "font-semibold")} {group.items.map((item) => {
> const isActive =
<Link item.href === "/"
href={item.href || "#"} ? pathname === "/"
onClick={onNavigate} : item.href
className="block w-full" ? pathname === item.href || pathname.startsWith(item.href + "/")
: false;
const Icon = item.icon;
return (
<SidebarMenuItem
key={item.href || item.title}
active={isActive}
icon={Icon ? <Icon className="h-4 w-4" /> : undefined}
className={cn(isActive && "font-semibold")}
> >
{item.title} <Link
</Link> href={item.href || "#"}
</SidebarMenuItem> onClick={onNavigate}
); className="block w-full"
})} >
</SidebarMenu> {item.title}
</SidebarSection> </Link>
</SidebarMenuItem>
);
})}
</SidebarMenu>
</SidebarSection>
{groupIndex < sidebarData.length - 1 ? (
<SidebarSeparator className="-mx-6 my-5 w-[calc(100%+3rem)]" />
) : null}
</div>
))} ))}
</SidebarContent> </SidebarContent>
<SidebarSeparator /> <SidebarSeparator className="mx-0 my-0 w-full" />
<SidebarFooter className="shrink-0"> <SidebarFooter className="shrink-0 border-t-0 px-6 py-5">
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<button <button
@@ -187,7 +194,12 @@ function AppSidebar({
</div> </div>
</button> </button>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent align="end" side="top" className="w-64"> <DropdownMenuContent
align="end"
side="right"
sideOffset={8}
className="w-64"
>
<DropdownMenuLabel className="font-normal"> <DropdownMenuLabel className="font-normal">
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1">
<span className="truncate text-sm font-medium text-foreground"> <span className="truncate text-sm font-medium text-foreground">
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts"; import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.