mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 09:42:43 +00:00
Initial pass: reset divider position on log out
This commit is contained in:
@@ -20,6 +20,9 @@ const Account = createClass({
|
|||||||
|
|
||||||
handleLogout : function(){
|
handleLogout : function(){
|
||||||
if(confirm('Are you sure you want to log out?')) {
|
if(confirm('Are you sure you want to log out?')) {
|
||||||
|
// Reset divider position
|
||||||
|
window.localStorage.removeItem('naturalcrit-pane-split');
|
||||||
|
// Clear login cookie
|
||||||
document.cookie = `nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;samesite=lax;${window.domain ? `domain=${window.domain}` : ''}`;
|
document.cookie = `nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;samesite=lax;${window.domain ? `domain=${window.domain}` : ''}`;
|
||||||
window.location = '/';
|
window.location = '/';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user