feature/implementacion de hub en EFC

This commit is contained in:
2026-06-08 07:19:29 -06:00
parent 6e2634d11b
commit 1c6b07be58
23 changed files with 2178 additions and 1039 deletions

View File

@@ -90,7 +90,11 @@ export default function UserForm() {
// Cargar importadores
useEffect(() => {
const access = localStorage.getItem('access');
if (!access) { window.location.href = '/login'; return; }
if (!access) {
const _hub = import.meta.env.VITE_HUB_URL || 'http://localhost:3001';
window.location.href = `${_hub}/login?return_to=${encodeURIComponent(window.location.origin + '/auth/sso')}`;
return;
}
fetch(`${import.meta.env.VITE_EFC_API_URL}/customs/importadores/`, {
headers: { Authorization: `Bearer ${access}` },
})