export function isDashboardPath(pathname: string) { return pathname.startsWith("/dashboard"); } export function shouldRedirectDashboardRequest( pathname: string, hasSession: boolean, ) { return isDashboardPath(pathname) && !hasSession; } export function getDashboardRedirectPath(hasSession: boolean) { return hasSession ? null : "/login"; }