Files
Benny JooandGitHub 76332a759b refactor: circular deps between app store and lib [5] (#23936)
* getBulkEventTypes

* 2 eventtypes related utils to features

* locationsResolver

* checkForEmptyAssignment

* mv defaultEvents to features

* update imports

* PrismaAppRepository

* mv currencyConversions from appstore to lib

* useAppsData

* videoClient

* analytics files

* fix

* mv

* prettier

* use named import
2025-09-19 10:16:56 -03:00

29 lines
707 B
TypeScript

import dynamic from "next/dynamic";
import { formatPrice } from "@calcom/lib/currencyConversions";
import type { EventPrice } from "../../types";
const AlbyPriceComponent = dynamic(
() => import("@calcom/app-store/alby/components/AlbyPriceComponent").then((m) => m.AlbyPriceComponent),
{
ssr: false,
}
);
export const Price = ({ price, currency, displayAlternateSymbol = true }: EventPrice) => {
if (price === 0) return null;
const formattedPrice = formatPrice(price, currency);
return currency !== "BTC" ? (
<>{formattedPrice}</>
) : (
<AlbyPriceComponent
displaySymbol={displayAlternateSymbol}
price={price}
formattedPrice={formattedPrice}
/>
);
};