Add dark mode support and theme provider
This commit is contained in:
+3
-4
@@ -12,7 +12,7 @@ import { NuevoIngreso } from '@/sections/NuevoIngreso';
|
||||
import { EditIngreso } from '@/sections/EditIngreso';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ThemeProvider } from '@/contexts/ThemeContext';
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
|
||||
function AppContent() {
|
||||
@@ -185,7 +185,7 @@ function AppContent() {
|
||||
getAreaName={(areaId) => store.areas.find(a => a.id === areaId)?.nombre || ''}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
case 'editaringreso': {
|
||||
const internacion = store.getInternacionById(store.currentInternacionId || '');
|
||||
const paciente = internacion ? store.getPacienteById(internacion.pacienteId) : undefined;
|
||||
@@ -225,8 +225,7 @@ function AppContent() {
|
||||
|
||||
function App() {
|
||||
return (
|
||||
// @ts-expect-error - next-themes types mismatch
|
||||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
||||
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
|
||||
<AppContent />
|
||||
<Toaster position="top-right" />
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user