Skip to content

Commit

Permalink
Enable testbed check
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbaeten committed Feb 20, 2023
1 parent 2419d0e commit 5264091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/components/testbed/TestBed.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React from 'react';
import TestBedAddCaForm from './forms/TestBedAddCaForm';
import { useRoute } from 'react-router5';
import Error from '../Error';
import Store from '../../core/store';
import useStore from '../../hooks/useStore';
import TestBedDelPubForm from './forms/TestBedDelPubForm';
import TestBedDelCaForm from './forms/TestBedDelCaForm';
import TestBedAddCaForm from './forms/TestBedAddCaForm';
import TestBedAddPubForm from './forms/TestBedAddPubForm';
import TestBedDelCaForm from './forms/TestBedDelCaForm';
import TestBedDelPubForm from './forms/TestBedDelPubForm';
import TestBedLayout from './TestBedLayout';
import useStore from '../../hooks/useStore';

export default function TestBed() {
const { route } = useRoute();
const store = useStore() as Store;

if (!store.testBedEnabled) {
// return <Error />;
return <Error />;
}

if (route.name == 'testbed.del_ca') {
Expand Down
4 changes: 2 additions & 2 deletions src/core/handlers/handleLoginRouting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Store from '../store';

export default async function handleLoginRouting(toState: State, store: Store) {
if (
toState.name.startsWith('testbed')
// (await store.loadTestBedEnabled())
toState.name.startsWith('testbed') &&
(await store.loadTestBedEnabled())
) {
return Promise.resolve();
}
Expand Down

0 comments on commit 5264091

Please sign in to comment.