Route tenant admin PWA via /event-admin

This commit is contained in:
Codex Agent
2025-10-10 15:20:52 +02:00
parent 417b1da484
commit 52197f216d
20 changed files with 112 additions and 75 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuth } from '../auth/context';
import { isAuthError } from '../auth/tokens';
import { ADMIN_HOME_PATH } from '../constants';
export default function AuthCallbackPage() {
const { completeLogin } = useAuth();
@@ -12,7 +13,7 @@ export default function AuthCallbackPage() {
const params = new URLSearchParams(window.location.search);
completeLogin(params)
.then((redirectTo) => {
navigate(redirectTo ?? '/admin', { replace: true });
navigate(redirectTo ?? ADMIN_HOME_PATH, { replace: true });
})
.catch((err) => {
console.error('[Auth] Callback processing failed', err);
@@ -33,3 +34,4 @@ export default function AuthCallbackPage() {
</div>
);
}