@@ -2,7 +2,7 @@ import { HelpText } from "components/HelpText";
2
2
import { Upload , Switch , Card , Input , message , Divider } from "antd" ;
3
3
import { TacoButton , CustomSelect , messageInstance , Dropdown , ResetIcon } from "lowcoder-design" ;
4
4
import React , { useEffect , useMemo , useState } from "react" ;
5
- import { useSelector } from "react-redux" ;
5
+ import { useDispatch , useSelector } from "react-redux" ;
6
6
import styled from "styled-components" ;
7
7
import { trans } from "i18n" ;
8
8
import { default as ColorPicker } from "antd/es/color-picker" ;
@@ -22,6 +22,7 @@ import { Org } from "@lowcoder-ee/constants/orgConstants";
22
22
import { BrandingConfig , BrandingSettings , createBranding , getBranding } from "@lowcoder-ee/api/enterpriseApi" ;
23
23
import Flex from "antd/es/flex" ;
24
24
import Button from "antd/es/button" ;
25
+ import { fetchBrandingSetting } from "@lowcoder-ee/redux/reduxActions/enterpriseActions" ;
25
26
26
27
const { TextArea } = Input ;
27
28
@@ -168,6 +169,7 @@ const beforeUpload = (file: RcFile) => {
168
169
} ;
169
170
170
171
export function BrandingSetting ( ) {
172
+ const dispatch = useDispatch ( ) ;
171
173
const [ configOrgId , setConfigOrgId ] = useState < string > ( '' ) ;
172
174
const [ settings , setSettings ] = useState < BrandingSettings > ( defaultSettings ) ;
173
175
const [ brandingConfig , setBrandingConfig ] = useState < BrandingConfig > ( ) ;
@@ -266,6 +268,8 @@ export function BrandingSetting() {
266
268
} ) ;
267
269
setDefaultBrandingConfig ( brandingConfig ) ;
268
270
messageInstance . success ( trans ( "theme.saveSuccessMsg" ) ) ;
271
+
272
+ dispatch ( fetchBrandingSetting ( { orgId : configOrgId } ) ) ;
269
273
} catch ( e ) {
270
274
console . error ( e )
271
275
}
0 commit comments