feat: add environment configuration files and update API base URL handling for production

This commit is contained in:
JSC
2025-08-09 14:43:09 +02:00
parent b43d29e862
commit d53c08d7a0
10 changed files with 55 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react'
import { useContext, useEffect, useState } from 'react'
import { ThemeProviderContext, type Theme } from '@/contexts/ThemeContext'
type ThemeProviderProps = {
@@ -49,3 +49,12 @@ export function ThemeProvider({
</ThemeProviderContext.Provider>
)
}
export const useTheme = () => {
const context = useContext(ThemeProviderContext)
if (context === undefined)
throw new Error('useTheme must be used within a ThemeProvider')
return context
}