Skip to content

TagSpaces is an offline, open source, document manager with tagging support

polish: clear URL param on sign-out

Ilian Sapundshiev86c8e42739e8
diff --git a/app/components/HelpFeedbackPanel.tsx b/app/components/HelpFeedbackPanel.tsx
index 1f21d5eb7..8a7390dd3 100644
--- a/app/components/HelpFeedbackPanel.tsx
+++ b/app/components/HelpFeedbackPanel.tsx
@@ -54,6 +54,7 @@ import styles from './SidePanels.css';
import AppConfig from '../config';
import i18n from '../services/i18n';
import { Pro } from '../pro';
+import { clearAllURLParams } from '-/utils/misc';
interface Props {
classes?: any;
@@ -68,6 +69,11 @@ interface Props {
style?: any;
}
+const signOut = () => {
+ Auth.signOut();
+ clearAllURLParams();
+};
+
const HelpFeedbackPanel = (props: Props) => {
const {
classes,
@@ -134,7 +140,7 @@ const HelpFeedbackPanel = (props: Props) => {
data-tid="signOutTID"
title={i18n.t('core:signOut')}
className={classes.mainActionButton}
- onClick={() => Auth.signOut()}
+ onClick={signOut}
size="small"
variant="outlined"
color="primary"
diff --git a/app/utils/misc.ts b/app/utils/misc.ts
index 2cbbc2eec..901f51e6e 100644
--- a/app/utils/misc.ts
+++ b/app/utils/misc.ts
@@ -137,7 +137,7 @@ export function getURLParameter(paramName: string, url?: string): string {
export function clearAllURLParams() {
window.history.pushState('', document.title, window.location.pathname);
- console.log(window.location.href);
+ // console.log(window.location.href);
}
export function clearURLParam(paramName) {
@@ -151,7 +151,7 @@ export function clearURLParam(paramName) {
document.title,
window.location.pathname + '?' + params
);
- console.log(window.location.href);
+ // console.log(window.location.href);
}
export function updateHistory(