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:
parent
424b86811f
commit
612adc60b2
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user