Skip to content

Commit

Permalink
chore: clear session on downloads only
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Nov 21, 2023
1 parent 6b6d2da commit 7ca7029
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/DownloadButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ export const DownloadButton: React.FC<Props> = (props) => {
};
}, []);

useEffect(() => {
if (lock === false) {
const api = new CoreApi();
api.deleteSession();
}
}, [lock, props.lock, props.disabled, props.auth]); // eslint-disable-line react-hooks/exhaustive-deps
// TODO: Clear Session for cleaning build files in temporary directory of core-api function
// useEffect(() => {
// if (lock === false) {
// const api = new CoreApi();
// api.deleteSession();
// }
// }, [lock, props.lock, props.disabled, props.auth]); // eslint-disable-line react-hooks/exhaustive-deps

const busy = loading || props.disabled;

Expand Down

0 comments on commit 7ca7029

Please sign in to comment.