mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
This reverts commit 5ea0436051.
This commit is contained in:
@@ -9,7 +9,6 @@ import {
|
||||
CHATWOOT_RESET,
|
||||
CHATWOOT_SET_USER,
|
||||
} from '../../helper/scriptHelpers';
|
||||
import { LocalStorage, LOCAL_STORAGE_KEYS } from '../../helper/localStorage';
|
||||
|
||||
Cookies.defaults = { sameSite: 'Lax' };
|
||||
|
||||
@@ -44,15 +43,10 @@ export const clearBrowserSessionCookies = () => {
|
||||
Cookies.remove('user');
|
||||
};
|
||||
|
||||
export const clearLocalStorageOnLogout = () => {
|
||||
LocalStorage.remove(LOCAL_STORAGE_KEYS.DRAFT_MESSAGES);
|
||||
};
|
||||
|
||||
export const clearCookiesOnLogout = () => {
|
||||
window.bus.$emit(CHATWOOT_RESET);
|
||||
window.bus.$emit(ANALYTICS_RESET);
|
||||
clearBrowserSessionCookies();
|
||||
clearLocalStorageOnLogout();
|
||||
const globalConfig = window.globalConfig || {};
|
||||
const logoutRedirectLink =
|
||||
globalConfig.LOGOUT_REDIRECT_LINK || frontendURL('login');
|
||||
|
||||
Reference in New Issue
Block a user