Skip to content

Commit 102a1a4

Browse files
fetch branding settings on save/update
1 parent 288ff65 commit 102a1a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/packages/lowcoder/src/pages/setting/branding/BrandingSetting.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { HelpText } from "components/HelpText";
22
import { Upload, Switch, Card, Input, message, Divider } from "antd";
33
import { TacoButton, CustomSelect, messageInstance, Dropdown, ResetIcon } from "lowcoder-design";
44
import React, { useEffect, useMemo, useState } from "react";
5-
import { useSelector } from "react-redux";
5+
import { useDispatch, useSelector } from "react-redux";
66
import styled from "styled-components";
77
import { trans } from "i18n";
88
import { default as ColorPicker } from "antd/es/color-picker";
@@ -22,6 +22,7 @@ import { Org } from "@lowcoder-ee/constants/orgConstants";
2222
import { BrandingConfig, BrandingSettings, createBranding, getBranding } from "@lowcoder-ee/api/enterpriseApi";
2323
import Flex from "antd/es/flex";
2424
import Button from "antd/es/button";
25+
import { fetchBrandingSetting } from "@lowcoder-ee/redux/reduxActions/enterpriseActions";
2526

2627
const { TextArea } = Input;
2728

@@ -168,6 +169,7 @@ const beforeUpload = (file: RcFile) => {
168169
};
169170

170171
export 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

Comments
 (0)