Files
calendar/packages/features/apps/components/AppListCard.tsx
T
Alex van AndelandGitHub be404436d7 fix: Do not self import @calcom/ui (#20050)
* fix: Do not self import @calcom/ui

* Make translations optional

* Fix mocking implementation of Button (never worked)

* Ensure other libraries can resolve AppListCard
2025-03-13 18:17:42 +00:00

26 lines
709 B
TypeScript

"use client";
import dynamic from "next/dynamic";
import { useMemo } from "react";
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
import type { AppListCardProps } from "@calcom/ui/components/app-list-card/AppListCard";
export default function AppListCard(props: AppListCardProps) {
const isPlatform = useIsPlatform();
// Dynamically import the correct wrapper
const AppListCardWrapper = useMemo(
() =>
dynamic(
() => (isPlatform ? import("./AppListCardPlatformWrapper") : import("./AppListCardWebWrapper")),
{
ssr: false, // Prevents SSR issues if needed
}
),
[isPlatform]
);
return <AppListCardWrapper {...props} />;
}