Make local DEV work out of the box

This commit is contained in:
MartinBraquet
2025-09-20 23:51:28 +02:00
parent d7c95e2ae0
commit 84a437772d
22 changed files with 138 additions and 121 deletions

View File

@@ -1,4 +1,4 @@
import {DOMAIN, LOCAL_DEV, LOCAL_WEB_URL} from 'common/envs/constants'
import {DOMAIN} from 'common/envs/constants'
// opengraph functions that run in static props or client-side, but not in the edge (in image creation)
@@ -10,5 +10,5 @@ export function buildOgUrl<P extends Record<string, string>>(
const generateUrlParams = (params: P) =>
new URLSearchParams(params).toString()
return `https://${domain ?? LOCAL_DEV ? LOCAL_WEB_URL : DOMAIN}/api/og/${endpoint}?` + generateUrlParams(props)
return `https://${domain ?? DOMAIN}/api/og/${endpoint}?` + generateUrlParams(props)
}