Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor(ui): Handling details

robin46e4bf84a079
diff --git a/ui/src/pages/Admin/Branding/index.tsx b/ui/src/pages/Admin/Branding/index.tsx
index 621f8305..5586958c 100644
--- a/ui/src/pages/Admin/Branding/index.tsx
+++ b/ui/src/pages/Admin/Branding/index.tsx
@@ -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>
);
};
diff --git a/ui/src/pages/Admin/General/index.tsx b/ui/src/pages/Admin/General/index.tsx
index 41ec1a14..3906f0fe 100644
--- a/ui/src/pages/Admin/General/index.tsx
+++ b/ui/src/pages/Admin/General/index.tsx
@@ -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: {
diff --git a/ui/src/pages/Admin/Smtp/index.tsx b/ui/src/pages/Admin/Smtp/index.tsx
index 0c3892bd..ebfb4004 100644
--- a/ui/src/pages/Admin/Smtp/index.tsx
+++ b/ui/src/pages/Admin/Smtp/index.tsx
@@ -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',