fix(admin): save appearanceVariables to admin global config state. Fixes #3170
This commit is contained in:
parent
2d420b98e8
commit
4790880c19
@ -123,7 +123,7 @@ const ColorCollection: FC<ColorCollectionProps> = ({ variables, updateColor }) =
|
||||
// eslint-disable-next-line react/function-component-definition
|
||||
export default function Appearance() {
|
||||
const serverStatusData = useContext(ServerStatusContext);
|
||||
const { serverConfig } = serverStatusData;
|
||||
const { serverConfig, setFieldInConfigState } = serverStatusData;
|
||||
const { instanceDetails } = serverConfig;
|
||||
const { appearanceVariables } = instanceDetails;
|
||||
|
||||
@ -202,6 +202,12 @@ export default function Appearance() {
|
||||
onSuccess: () => {
|
||||
setSubmitStatus(createInputStatus(STATUS_SUCCESS, 'Updated.'));
|
||||
resetTimer = setTimeout(resetStates, RESET_TIMEOUT);
|
||||
|
||||
setFieldInConfigState({
|
||||
fieldName: 'appearanceVariables',
|
||||
value: c,
|
||||
path: 'instanceDetails',
|
||||
});
|
||||
},
|
||||
onError: (message: string) => {
|
||||
setSubmitStatus(createInputStatus(STATUS_ERROR, message));
|
||||
|
Loading…
x
Reference in New Issue
Block a user