diff --git a/platform/app/public/config/dev.js b/platform/app/public/config/dev.js index ca768361e..7c10a9b42 100644 --- a/platform/app/public/config/dev.js +++ b/platform/app/public/config/dev.js @@ -30,7 +30,7 @@ window.config = { showStudyList: true, - maxNumberOfWebWorkers: 3, + maxNumberOfWebWorkers: 1, showWarningMessageForCrossOrigin: true, diff --git a/platform/app/src/routes/TrizRisProtectedRoute.tsx b/platform/app/src/routes/TrizRisProtectedRoute.tsx index e0a2c6393..14b8360b4 100644 --- a/platform/app/src/routes/TrizRisProtectedRoute.tsx +++ b/platform/app/src/routes/TrizRisProtectedRoute.tsx @@ -24,7 +24,7 @@ export default function TrizRisProtectedRoute({ children }: Props) { console.log('### VERIFICATION ACCES TRIZRIS ###', result); - setAuthorized(result); + setAuthorized(result !== null && result.authorized === true); } catch (error) { console.error('### ERREUR VERIFICATION ACCES TRIZRIS ###', error); @@ -45,8 +45,7 @@ export default function TrizRisProtectedRoute({ children }: Props) { }; }, []); - // Pendant la vérification : - // on n'affiche PAS encore le viewer. + // Vérification en cours if (checking) { return (
{children}; } diff --git a/platform/core/src/config/TrizRisConfig.ts b/platform/core/src/config/TrizRisConfig.ts index e52c1b8cb..6982d3473 100644 --- a/platform/core/src/config/TrizRisConfig.ts +++ b/platform/core/src/config/TrizRisConfig.ts @@ -1,4 +1,4 @@ -const sharedConfig = require('../../config/trizris.shared'); +import sharedConfig from '../../../app/config/trizris.shared'; export const TrizRisConfig = { apiBaseUrl: `${sharedConfig.TRIZRIS_BASE_URL}/api`,