chore: reorganize dashboard components
- Move `AppSidebar` to a new directory for better organization. - Update imports for `PricingComparator` to reflect its new location within the blocks directory. - Remove obsolete `fill-remaining-space.tsx` component to clean up the codebase. - Introduce new `PricingComparator` component for improved pricing comparison functionality. - Add new dashboard navigation components (`NavMain`, `NavProjects`, `NavSecondary`, `NavUser`) to enhance user experience and organization within the dashboard.
This commit is contained in:
parent
cb0c852933
commit
9e04764444
@ -1,4 +1,4 @@
|
||||
import { AppSidebar } from '@/components/app-sidebar';
|
||||
import { AppSidebar } from '@/components/dashboard/app-sidebar';
|
||||
import {
|
||||
Breadcrumb,
|
||||
BreadcrumbItem,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Pricing3 from '@/components/blocks/pricing/pricing-3';
|
||||
import Pricing4 from '@/components/blocks/pricing/pricing-4';
|
||||
import Pricing5 from '@/components/blocks/pricing/pricing-5';
|
||||
import PricingComparator from '@/components/pricing-comparator';
|
||||
import PricingComparator from '@/components/blocks/pricing/pricing-comparator';
|
||||
import { Locale } from 'next-intl';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Pricing3 from '@/components/blocks/pricing/pricing-3';
|
||||
import Pricing4 from '@/components/blocks/pricing/pricing-4';
|
||||
import Pricing5 from '@/components/blocks/pricing/pricing-5';
|
||||
import PricingComparator from '@/components/pricing-comparator';
|
||||
import PricingComparator from '@/components/blocks/pricing/pricing-comparator';
|
||||
import { constructMetadata } from '@/lib/metadata';
|
||||
import { getBaseUrlWithLocale } from '@/lib/urls/get-base-url';
|
||||
import { Metadata } from 'next';
|
||||
|
@ -13,10 +13,10 @@ import {
|
||||
Settings2,
|
||||
SquareTerminal,
|
||||
} from 'lucide-react';
|
||||
import { NavMain } from '@/components/nav-main';
|
||||
import { NavProjects } from '@/components/nav-projects';
|
||||
import { NavSecondary } from '@/components/nav-secondary';
|
||||
import { NavUser } from '@/components/nav-user';
|
||||
import { NavMain } from '@/components/dashboard/nav-main';
|
||||
import { NavProjects } from '@/components/dashboard/nav-projects';
|
||||
import { NavSecondary } from '@/components/dashboard/nav-secondary';
|
||||
import { NavUser } from '@/components/dashboard/nav-user';
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
@ -29,7 +29,8 @@ import {
|
||||
import { getWebsiteInfo } from '@/config';
|
||||
import { createTranslator } from '@/i18n/translator';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Logo } from './logo';
|
||||
import { Logo } from '../logo';
|
||||
import { LocaleLink } from '@/i18n/navigation';
|
||||
|
||||
const data = {
|
||||
user: {
|
||||
@ -110,7 +111,7 @@ const data = {
|
||||
url: '#',
|
||||
},
|
||||
{
|
||||
title: 'Team',
|
||||
title: 'Security',
|
||||
url: '#',
|
||||
},
|
||||
{
|
||||
@ -165,15 +166,14 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton size="lg" asChild>
|
||||
<a href="/">
|
||||
<LocaleLink href="/">
|
||||
<Logo className="size-8" />
|
||||
<div className="grid flex-1 text-left leading-tight">
|
||||
<span className="truncate font-semibold text-lg">
|
||||
{websiteInfo.name}
|
||||
</span>
|
||||
{/* <span className="truncate text-xs">{websiteInfo.description}</span> */}
|
||||
</div>
|
||||
</a>
|
||||
</LocaleLink>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
@ -34,7 +34,7 @@ export function NavMain({
|
||||
}) {
|
||||
return (
|
||||
<SidebarGroup>
|
||||
<SidebarGroupLabel>Platform</SidebarGroupLabel>
|
||||
<SidebarGroupLabel>Dashboard</SidebarGroupLabel>
|
||||
<SidebarMenu>
|
||||
{items.map((item) => (
|
||||
<Collapsible key={item.title} asChild defaultOpen={item.isActive}>
|
@ -1,5 +0,0 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export function FillRemainingSpace(): React.JSX.Element {
|
||||
return <div aria-hidden="true" className="flex-1 shrink" />;
|
||||
}
|
@ -8,11 +8,12 @@
|
||||
/* @import "./theme-blue.css"; */
|
||||
/* @import "./theme-violet.css"; */
|
||||
/* @import "./theme-zinc.css"; */
|
||||
@import "./theme.css";
|
||||
@import "./theme-zinc.css";
|
||||
|
||||
html {
|
||||
/* prevent the layout from shifting when the scrollbar appears or disappears. */
|
||||
scrollbar-gutter: stable;
|
||||
|
||||
/* Force the scrollbar to always be visible to prevent layout shifts */
|
||||
/* can not set this, otherwise the theme switcher will disappear when click it after page scrolled */
|
||||
/* overflow-y: scroll; */
|
||||
|
Loading…
Reference in New Issue
Block a user