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:
1 parent
ecb5417170
commit
5449c05b5b
56 files changed
+132
-124
No files matched your search
@@ -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