import { Alert } from "@scandic-hotels/design-system/Alert" import { getAlertPhoneContactData } from "@scandic-hotels/trpc/routers/contentstack/base/utils" import { serverClient } from "@/lib/trpc/server" import type { AlertBlock } from "@scandic-hotels/trpc/types/blocks" interface AlertBlockProps extends Pick {} export async function AlertBlock({ alert }: AlertBlockProps) { const caller = await serverClient() const contactConfig = await caller.contentstack.base.contact() if (!alert) { return null } const phoneContact = alert.phoneContact && contactConfig ? getAlertPhoneContactData(alert, contactConfig) : null return ( ) }