Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Refactored metadata for contacts, administration, and Ulticards pages to utilize dynamic app names and descriptions. - Introduced new product pages for Ultiai, Ultical, Ulticards, Ultidrive, Ultimail, and Ultimeet with appropriate metadata. - Enhanced layout components to ensure consistent styling and functionality across new product sections. - Updated various components to replace hardcoded labels with dynamic references to improve maintainability and consistency.
21 lines
728 B
TypeScript
21 lines
728 B
TypeScript
export type DemoMailPreviewLayout = "phone" | "tablet" | "desktop"
|
|
|
|
export function getDemoMailPreviewLayout(): DemoMailPreviewLayout | null {
|
|
if (typeof window === "undefined") return null
|
|
if (!window.location.pathname.includes("/demo/mail")) return null
|
|
const param = new URLSearchParams(window.location.search).get("preview")
|
|
if (param === "phone" || param === "tablet" || param === "desktop") return param
|
|
return null
|
|
}
|
|
|
|
export function demoMailPreviewSrc(
|
|
layout: DemoMailPreviewLayout,
|
|
messageId = "m1"
|
|
): string {
|
|
const preview = `preview=${layout}`
|
|
if (layout === "phone") {
|
|
return `/demo/mail/inbox?${preview}`
|
|
}
|
|
return `/demo/mail/inbox/message/${encodeURIComponent(messageId)}?${preview}`
|
|
}
|