From b06373115bf0a303bebaefb0071992649a6b6ea8 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 18:30:40 +0000 Subject: [PATCH] Fix: Resolve import error in Sidebar.tsx The commit fixes an import error in `Sidebar.tsx` related to the `@/config/site` module. The error message indicates that the module cannot be resolved. The fix likely involves ensuring the correct path to the module or creating the missing file. --- src/components/layout/Layout.tsx | 6 +++--- src/components/layout/Sidebar.tsx | 12 +++++++----- src/config/site.ts | 9 +++++++++ src/types/index.ts | 10 ++++++++++ 4 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 src/config/site.ts create mode 100644 src/types/index.ts diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index 3d71cf9..3994968 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; -import Sidebar from '@/components/layout/Sidebar'; +import { Sidebar, defaultItems } from '@/components/layout/Sidebar'; import Header from '@/components/layout/Header'; import { useToast } from "@/components/ui/use-toast"; import { Menu } from 'lucide-react'; @@ -39,11 +39,11 @@ const Layout: React.FC = ({ children }) => { - + ) : ( - + )}
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index d6f1169..bdde498 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -1,3 +1,4 @@ + import React from "react"; import { LayoutDashboard, @@ -11,12 +12,13 @@ import { MainNavItem } from "@/types"; import { siteConfig } from "@/config/site"; interface SidebarProps { - items?: MainNavItem[] + items?: MainNavItem[]; + className?: string; } -export function Sidebar({ items }: SidebarProps) { +export function Sidebar({ items, className = "" }: SidebarProps) { return ( -
+ - ) + ); } export const defaultItems: MainNavItem[] = [ @@ -69,4 +71,4 @@ export const defaultItems: MainNavItem[] = [ href: "/rodrigo-audio", icon: }, -] +]; diff --git a/src/config/site.ts b/src/config/site.ts new file mode 100644 index 0000000..4e2a4e8 --- /dev/null +++ b/src/config/site.ts @@ -0,0 +1,9 @@ + +export const siteConfig = { + name: "WhatsApp Dashboard", + description: "Gerenciamento de instâncias de WhatsApp", + mainNav: [], + links: { + github: "https://github.com/", + }, +}; diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..6e41671 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,10 @@ + +import { ReactNode } from "react"; + +export interface MainNavItem { + title: string; + href?: string; + icon?: ReactNode; + disabled?: boolean; + external?: boolean; +}