Skip to content

Commit

Permalink
Update useLogout.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewguywright committed Mar 1, 2024
1 parent 61061b6 commit 665b377
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/faustwp-core/src/hooks/useLogout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ export function useLogout() {

if (redirectUrl) {
window.location.assign(redirectUrl);
}

if (isPreview) {
} else if (isPreview) {
const publicUrlPath = process.env.NEXT_PUBLIC_URL;
if (publicUrlPath) {
window.location.assign(publicUrlPath);
} else {
window.location.reload();
}
} else {
window.location.reload();
}

window.location.reload();

setLoading(false);
}

Expand Down

0 comments on commit 665b377

Please sign in to comment.