export function DynamicComponent>(props: { componentMap: T; slug: string; wrapperClassName?: string; }) { const { componentMap, slug, ...rest } = props; const dirName = slug === "stripe" ? "stripepayment" : slug; // There can be apps with no matching component if (!componentMap[slug]) return null; const Component = componentMap[dirName]; return (
); }