2
0

first commit

This commit is contained in:
2024-08-09 00:39:27 +02:00
commit 79688abe2e
5698 changed files with 497838 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import dynamic from "next/dynamic";
export const ConfigAppMap = {
vital: dynamic(() => import("../vital/components/AppConfiguration")),
};
export const AppConfiguration = (props: { type: string } & { credentialIds: number[] }) => {
let appName = props.type.replace(/_/g, "");
let ConfigAppComponent = ConfigAppMap[appName as keyof typeof ConfigAppMap];
/** So we can either call it by simple name (ex. `slack`, `giphy`) instead of
* `slackmessaging`, `giphyother` while maintaining retro-compatibility. */
if (!ConfigAppComponent) {
[appName] = props.type.split("_");
ConfigAppComponent = ConfigAppMap[appName as keyof typeof ConfigAppMap];
}
if (!ConfigAppComponent) return null;
return <ConfigAppComponent credentialIds={props.credentialIds} />;
};