Files
calendar/packages/app-store/_components/DynamicComponent.tsx
T
Carina WollendorferGitHubCarinaWollikodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>zomars
6483182ef6 add invite link to Zapier setup page (#2696)
* add invite link and toaster to zapier setup page

* create env variable for invite link and save in database

* fetch invite link form getStaticProps

* add getStaticPath method

* clean code

* Moves app setup and index page

* Moves Loader to ui

* Trying new way to handle dynamic app store pages

* Cleanup

* Update tailwind.config.js

* zapier invite link fixes

* Tests fixes

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
2022-05-11 04:58:10 +00:00

10 lines
276 B
TypeScript

export function DynamicComponent<T extends Record<string, any>>(props: { componentMap: T; slug: string }) {
const { componentMap, slug, ...rest } = props;
if (!componentMap[slug]) return null;
const Component = componentMap[slug];
return <Component {...rest} />;
}