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";
|
import SettingsSidebar from "@/components/settings/SettingsSidebar";
|
||||||
|
|
||||||
const Configuracoes = () => {
|
const Configuracoes = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen bg-background">
|
<SidebarProvider>
|
||||||
<div className="hidden md:block w-64 flex-shrink-0 border-r">
|
<div className="flex min-h-screen w-full bg-background">
|
||||||
<SettingsSidebar />
|
<SettingsSidebar />
|
||||||
</div>
|
|
||||||
<main className="flex-1 p-6">
|
<main className="flex-1 p-6">
|
||||||
<h1 className="text-2xl font-bold mb-4">Configurações</h1>
|
<h1 className="text-2xl font-bold mb-4">Configurações</h1>
|
||||||
{/* Aqui virá o conteúdo das configurações que você solicitar */}
|
{/* Aqui virá o conteúdo das configurações que você solicitar */}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
</SidebarProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user