feat: implement ThemeProvider and SoundCard components; add utility functions for formatting duration and size

This commit is contained in:
JSC
2025-08-02 18:21:26 +02:00
parent e66ab7b7f8
commit b42b802c37
9 changed files with 424 additions and 29 deletions

11
src/hooks/use-theme.ts Normal file
View File

@@ -0,0 +1,11 @@
import { useContext } from 'react'
import { ThemeProviderContext } from '@/contexts/ThemeContext'
export const useTheme = () => {
const context = useContext(ThemeProviderContext)
if (context === undefined)
throw new Error('useTheme must be used within a ThemeProvider')
return context
}