Refactor components to enhance code clarity and maintainability by updating prop types to use Readonly for better immutability. Adjust Result class methods for consistency, and streamline query functions in ChannelDetail and other components to improve performance and readability.
This commit is contained in:
@@ -13,7 +13,7 @@ function applyTheme(theme: Theme) {
|
||||
root.classList.toggle('dark', resolve(theme) === 'dark')
|
||||
}
|
||||
|
||||
export function ThemeProvider({ children }: { children: ReactNode }) {
|
||||
export function ThemeProvider({ children }: Readonly<{ children: ReactNode }>) {
|
||||
const [theme, setThemeState] = useState<Theme>(
|
||||
() => (localStorage.getItem(THEME_STORAGE_KEY) as Theme | null) ?? 'dark',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user