Unverified Commit 4b743dac authored by gaoyan's avatar gaoyan Committed by GitHub

[Fix] fix `enableModelTip` state error (#3118)

parent 48b7a66e
......@@ -128,7 +128,7 @@ const AvatarDropdown = () => {
const { initialState, setInitialState } = useModel('@@initialState');
const [enableModelTip, setEnableModelTip] = useState<boolean>(
Boolean(getValueFromLocalStorage(ENABLE_MODEL_TIP))
getValueFromLocalStorage(ENABLE_MODEL_TIP) == 'true'
);
const loginOutHandler = useCallback(
......
......@@ -101,7 +101,7 @@ export const errorConfig: RequestConfig = {
if (error.response.status === 401) {
history.push(API_CONSTANTS.LOGIN_PATH);
} else {
if (Boolean(getValueFromLocalStorage(ENABLE_MODEL_TIP))) {
if (getValueFromLocalStorage(ENABLE_MODEL_TIP) == 'true') {
ErrorNotification(error.message, error.code);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment