feat(SW-3240): Move StaticMap to design-system * Move StaticMap to design-system Approved-by: Joakim Jäderberg
23 lines
532 B
TypeScript
23 lines
532 B
TypeScript
import StaticMapPrimitive from "@scandic-hotels/design-system/StaticMap"
|
|
|
|
import { env } from "@/env/server"
|
|
|
|
import type { ComponentProps } from "react"
|
|
|
|
type Props = Omit<
|
|
ComponentProps<typeof StaticMapPrimitive>,
|
|
"googleMapKey" | "googleMapSecret"
|
|
>
|
|
export default async function StaticMap(props: Props) {
|
|
const key = env.GOOGLE_STATIC_MAP_KEY
|
|
const secret = env.GOOGLE_STATIC_MAP_SIGNATURE_SECRET
|
|
|
|
return (
|
|
<StaticMapPrimitive
|
|
{...props}
|
|
googleMapKey={key}
|
|
googleMapSecret={secret}
|
|
/>
|
|
)
|
|
}
|