feat: make map key and signature optional

This commit is contained in:
Fredrik Thorsson
2024-08-13 11:24:06 +02:00
parent 242d604308
commit 02cd647649
2 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ export default function StaticMap({
}: StaticMapProps) {
const key = env.GOOGLE_STATIC_MAP_KEY
const secret = env.GOOGLE_STATIC_MAP_SIGNATURE_SECRET
const safeSecret = decodeBase64Hash(removeWebSafe(secret))
const safeSecret = decodeBase64Hash(removeWebSafe(secret ?? ""))
const url = new URL(
`https://maps.googleapis.com/maps/api/staticmap?center=${city}&zoom=${zoomLevel}&size=${width}x${height}&maptype=${mapType}&key=${key}`