Fix: Wrap SettingsSidebar with SidebarProvider

The error "useSidebar must be used within a SidebarProvider" indicates that the SettingsSidebar component is using the useSidebar hook without being wrapped by the SidebarProvider. This commit wraps the SettingsSidebar component with the SidebarProvider in the Configuracoes page to resolve the error.
This commit is contained in:
gpt-engineer-app[bot] 2025-06-15 18:38:42 +00:00
parent 424b86811f
commit 612adc60b2

View File

@ -1,17 +1,18 @@
import { SidebarProvider } from "@/components/ui/sidebar";
import SettingsSidebar from "@/components/settings/SettingsSidebar";
const Configuracoes = () => {
return (
<div className="flex min-h-screen bg-background">
<div className="hidden md:block w-64 flex-shrink-0 border-r">
<SidebarProvider>
<div className="flex min-h-screen w-full bg-background">
<SettingsSidebar />
<main className="flex-1 p-6">
<h1 className="text-2xl font-bold mb-4">Configurações</h1>
{/* Aqui virá o conteúdo das configurações que você solicitar */}
</main>
</div>
<main className="flex-1 p-6">
<h1 className="text-2xl font-bold mb-4">Configurações</h1>
{/* Aqui virá o conteúdo das configurações que você solicitar */}
</main>
</div>
</SidebarProvider>
);
};