mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
19 lines
700 B
TypeScript
19 lines
700 B
TypeScript
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { MessageModal } from "@/app/modals/messagemodal";
|
|
import { AboutModal } from "./about";
|
|
import { TosModal } from "./tos";
|
|
import { UserInputModal } from "./userinputmodal";
|
|
|
|
const modalRegistry: { [key: string]: React.ComponentType<any> } = {
|
|
[TosModal.displayName || "TosModal"]: TosModal,
|
|
[UserInputModal.displayName || "UserInputModal"]: UserInputModal,
|
|
[AboutModal.displayName || "AboutModal"]: AboutModal,
|
|
[MessageModal.displayName || "MessageModal"]: MessageModal,
|
|
};
|
|
|
|
export const getModalComponent = (key: string): React.ComponentType<any> | undefined => {
|
|
return modalRegistry[key];
|
|
};
|