refactor(ui): Handling details

This commit is contained in:
robin 2022-11-10 16:07:56 +08:00
parent 297186d1ea
commit 46e4bf84a0
3 changed files with 3 additions and 19 deletions

View File

@ -12,24 +12,10 @@ const Index: FC = () => {
'https://image-static.segmentfault.com/405/057/4050570037-636c7b0609a49',
);
const imgUpload = (file: any) => {
return new Promise((resolve) => {
console.log(file);
resolve(true);
});
};
return (
<div>
<h3 className="mb-4">{t('page_title')}</h3>
<BrandUpload
type="logo"
imgPath={img}
uploadCallback={imgUpload}
deleteCallback={() => {
console.log('delete');
setImg('');
}}
/>
<BrandUpload type="logo" value={img} onChange={setImg} />
</div>
);
};

View File

@ -18,8 +18,7 @@ const General: FC = () => {
const { data: setting } = useGeneralSetting();
const schema: JSONSchema = {
title: t('title'),
description: t('description'),
title: t('page_title'),
required: ['name', 'site_url', 'contact_email'],
properties: {
name: {

View File

@ -15,8 +15,7 @@ const Smtp: FC = () => {
const Toast = useToast();
const { data: setting } = useSmtpSetting();
const schema: JSONSchema = {
title: t('title'),
description: t('description'),
title: t('page_title'),
properties: {
from_email: {
type: 'string',