feature/implementacion de hub en EFC
This commit is contained in:
@@ -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}` },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user