Files
yaak/apps/yaak-client/components/CargoFeature.tsx
2026-05-07 15:50:10 -07:00

20 lines
430 B
TypeScript

import type { ReactNode } from "react";
import { appInfo } from "../lib/appInfo";
interface Props {
children: ReactNode;
feature: "updater" | "license";
}
const featureMap: Record<Props["feature"], boolean> = {
updater: appInfo.featureUpdater,
license: appInfo.featureLicense,
};
export function CargoFeature({ children, feature }: Props) {
if (featureMap[feature]) {
return <>{children}</>;
}
return null;
}