This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

try again

+5 -5
+3 -3
app/src/components/ThemeToggle.tsx
··· 1 1 'use client'; 2 2 3 - import { useTheme } from '@/lib/theme-context'; 3 + import { useTheme, ThemeContextType, Theme } from '@/lib/theme-context'; 4 4 import React, { useState, useEffect } from 'react'; 5 5 import styles from './ThemeToggle.module.css'; 6 6 ··· 38 38 export default function ThemeToggle() { 39 39 // Prevent hydration errors by using conditional hooks 40 40 const [mounted, setMounted] = useState(false); 41 - const [themeState, setThemeState] = useState('system'); 41 + const [themeState, setThemeState] = useState<Theme>('system'); 42 42 43 43 // Safe way to access theme context that won't break SSR 44 - let themeContext; 44 + let themeContext: ThemeContextType | undefined = undefined; 45 45 try { 46 46 themeContext = useTheme(); 47 47 } catch (e) {
+2 -2
app/src/lib/theme-context.tsx
··· 2 2 3 3 import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; 4 4 5 - type Theme = 'light' | 'dark' | 'system'; 5 + export type Theme = 'light' | 'dark' | 'system'; 6 6 7 - interface ThemeContextType { 7 + export interface ThemeContextType { 8 8 theme: Theme; 9 9 setTheme: (theme: Theme) => void; 10 10 }