aboutsummaryrefslogtreecommitdiff
path: root/src/requests.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-10 00:02:24 +0300
committereug-vs <eug-vs@keemail.me>2020-08-10 00:02:24 +0300
commitfd6e663a1bcc43cfc49bda99ccbfab380489324b (patch)
treeea25ea2c81db0f64e10123dbadd73f361b904da2 /src/requests.ts
parent359ec6a68ea92b3d1eecf020742157eb3be90b9f (diff)
downloadwhich-ui-fd6e663a1bcc43cfc49bda99ccbfab380489324b.tar.gz
feat!: add useLocalStorage hook
Diffstat (limited to 'src/requests.ts')
-rw-r--r--src/requests.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/requests.ts b/src/requests.ts
index e1f82b4..8ec8e3d 100644
--- a/src/requests.ts
+++ b/src/requests.ts
@@ -14,7 +14,7 @@ requests.interceptors.request.use(config => {
requests.interceptors.response.use(response => response, error => {
if (error.message === 'Request failed with status code 401' && localStorage.getItem('token')) {
- localStorage.setItem('shouldClear', 'true');
+ localStorage.removeItem('remember');
window.location.reload();
}
return Promise.reject(error);