M: Prevent user from creating OSS from file

This commit is contained in:
Ivan 2024-09-02 18:38:36 +03:00
parent 79c2050ed2
commit 15837d7a06

View File

@ -114,9 +114,17 @@ function FormCreateItem() {
handleSelectLocation(initLocation);
}, [initLocation, handleSelectLocation]);
useLayoutEffect(() => {
if (itemType !== LibraryItemType.RSFORM) {
setFile(undefined);
setFileName('');
}
}, [itemType]);
return (
<form className={clsx('cc-column', 'min-w-[30rem] max-w-[30rem] mx-auto', 'px-6 py-3')} onSubmit={handleSubmit}>
<h1>
{itemType == LibraryItemType.RSFORM ? (
<Overlay position='top-0 right-[0.5rem]'>
<input
id='schema_file'
@ -132,6 +140,7 @@ function FormCreateItem() {
onClick={() => inputRef.current?.click()}
/>
</Overlay>
) : null}
Создание схемы
</h1>