This commit is contained in:
haitao(lj) 2022-09-29 10:49:10 +08:00
parent b53efcd2dd
commit cedf5a9516
2 changed files with 2 additions and 26 deletions

View File

@ -38,7 +38,7 @@ const General: FC = () => {
});
const checkValidated = (): boolean => {
let ret = true;
const { name, short_description, description } = formData;
const { name } = formData;
if (!name.value) {
ret = false;
formData.name = {
@ -47,22 +47,6 @@ const General: FC = () => {
errorMsg: t('name.msg'),
};
}
if (!short_description.value) {
ret = false;
formData.short_description = {
value: '',
isInvalid: true,
errorMsg: t('short_description.msg'),
};
}
if (!description.value) {
ret = false;
formData.description = {
value: '',
isInvalid: true,
errorMsg: t('description.msg'),
};
}
setFormData({
...formData,
});

View File

@ -73,16 +73,8 @@ const Interface: FC = () => {
const checkValidated = (): boolean => {
let ret = true;
const { logo, theme, language } = formData;
const { theme, language } = formData;
const formCheckData = { ...formData };
if (!logo.value) {
ret = false;
formCheckData.logo = {
value: '',
isInvalid: true,
errorMsg: t('logo.msg'),
};
}
if (!theme.value) {
ret = false;
formCheckData.theme = {