first commit

This commit is contained in:
Andres Santana
2026-09-30 10:08:56 -04:00
commit ed5e152359
162 changed files with 27775 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import React, { createContext, useContext, useEffect } from 'react';
const ThemeContext = createContext();
// Light theme only — the site no longer supports a dark mode.
export const ThemeProvider = ({ children }) => {
useEffect(() => {
const root = window.document.documentElement;
root.classList.remove('dark');
root.classList.add('light');
// Clear any previously persisted dark preference.
localStorage.removeItem('theme-preference');
}, []);
// Kept for backward compatibility with consumers that still call useTheme.
// toggleTheme is a no-op now.
return (
<ThemeContext.Provider value={{ theme: 'light', toggleTheme: () => {} }}>
{children}
</ThemeContext.Provider>
);
};
export const useTheme = () => {
const context = useContext(ThemeContext);
if (context === undefined) {
throw new Error('useTheme must be used within a ThemeProvider');
}
return context;
};