fix: logout redirect (#802)

This commit is contained in:
2025-12-19 17:19:09 +01:00
committed by GitHub
parent 37a454f283
commit f0ee7b531a
2 changed files with 12 additions and 1 deletions

View File

@@ -18,3 +18,8 @@ export const LOGIN_REQUIRED_PAGES = [
export const PROTECTED_PAGES = new RegExp(
LOGIN_REQUIRED_PAGES.map((page) => `^${page}$`).join("|"),
);
export function getLogoutRedirectUrl(pathname: string): string {
const transcriptPagePattern = /^\/transcripts\/[^/]+$/;
return transcriptPagePattern.test(pathname) ? pathname : "/";
}