/** * What to do when an admin action is refused. * * The site has no login of its own: it borrows the main site's session * (internal/auth on the server), as the job tracker does. By the time a * request is refused the server has already tried the site's refresh token, * so the only way back is the site's login page, which returns here after. */ export function goToLogin() { const here = window.location.pathname + window.location.search; window.location.assign(`/admin/login?redirect=${encodeURIComponent(here)}`); }