Remove varianle NEXT_PUBLIC_BASE_URL

This commit is contained in:
Sebastien Castiel
2024-01-19 12:03:16 -05:00
parent 23524cb943
commit 4d86c8c727
8 changed files with 36 additions and 27 deletions

View File

@@ -40,3 +40,11 @@ export function useMediaQuery(query: string): boolean {
return matches
}
export function useBaseUrl() {
const [baseUrl, setBaseUrl] = useState<string | null>(null)
useEffect(() => {
setBaseUrl(window.location.origin)
}, [])
return baseUrl
}