@@ -2,7 +2,7 @@ import { HelpText } from "components/HelpText";
22import { Upload , Switch , Card , Input , message , Divider } from "antd" ;
33import { TacoButton , CustomSelect , messageInstance , Dropdown , ResetIcon } from "lowcoder-design" ;
44import React , { useEffect , useMemo , useState } from "react" ;
5- import { useSelector } from "react-redux" ;
5+ import { useDispatch , useSelector } from "react-redux" ;
66import styled from "styled-components" ;
77import { trans } from "i18n" ;
88import { default as ColorPicker } from "antd/es/color-picker" ;
@@ -22,6 +22,7 @@ import { Org } from "@lowcoder-ee/constants/orgConstants";
2222import { BrandingConfig , BrandingSettings , createBranding , getBranding } from "@lowcoder-ee/api/enterpriseApi" ;
2323import Flex from "antd/es/flex" ;
2424import Button from "antd/es/button" ;
25+ import { fetchBrandingSetting } from "@lowcoder-ee/redux/reduxActions/enterpriseActions" ;
2526
2627const { TextArea } = Input ;
2728
@@ -168,6 +169,7 @@ const beforeUpload = (file: RcFile) => {
168169} ;
169170
170171export function BrandingSetting ( ) {
172+ const dispatch = useDispatch ( ) ;
171173 const [ configOrgId , setConfigOrgId ] = useState < string > ( '' ) ;
172174 const [ settings , setSettings ] = useState < BrandingSettings > ( defaultSettings ) ;
173175 const [ brandingConfig , setBrandingConfig ] = useState < BrandingConfig > ( ) ;
@@ -266,6 +268,8 @@ export function BrandingSetting() {
266268 } ) ;
267269 setDefaultBrandingConfig ( brandingConfig ) ;
268270 messageInstance . success ( trans ( "theme.saveSuccessMsg" ) ) ;
271+
272+ dispatch ( fetchBrandingSetting ( { orgId : configOrgId } ) ) ;
269273 } catch ( e ) {
270274 console . error ( e )
271275 }
0 commit comments