-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with formModal #4
Comments
the correct code import { // Définition des types pour les fonctions de suppression const deleteActionMap: Record<string, DeleteFunction> = { // Chargement dynamique des formulaires Loading...,}); const StudentForm = dynamic(() => import("./forms/StudentForm"), { loading: () => Loading...,}); const SubjectForm = dynamic(() => import("./forms/SubjectForm"), { loading: () => Loading...,}); const ClassForm = dynamic(() => import("./forms/ClassForm"), { loading: () => Loading...,}); const ExamForm = dynamic(() => import("./forms/ExamForm"), { loading: () => Loading...,}); // Définition des types pour les fonctions de formulaire // Objet contenant les fonctions de formulaire // Type pour les tables valides // Props pour le composant FormModal const FormModal = ({ const [open, setOpen] = useState(false); const Form = () => {
}; return ( )} </> ); }; export default FormModal; |
you have to create a parentForm and call it |
Unhandled Runtime Error
TypeError: forms[table] is not a function
Source
src\components\FormModal.tsx (151:20) @ setOpen
149 |
150 | ) : type === "create" || type === "update" ? (
The text was updated successfully, but these errors were encountered: