diff --git a/geneit_app/src/routes/FamiliesListRoute.tsx b/geneit_app/src/routes/FamiliesListRoute.tsx index 721221b..c65af01 100644 --- a/geneit_app/src/routes/FamiliesListRoute.tsx +++ b/geneit_app/src/routes/FamiliesListRoute.tsx @@ -32,7 +32,8 @@ export function FamiliesListRoute(): React.ReactElement { return ( ( diff --git a/geneit_app/src/widgets/AsyncWidget.tsx b/geneit_app/src/widgets/AsyncWidget.tsx index 88fc8ea..d213c21 100644 --- a/geneit_app/src/widgets/AsyncWidget.tsx +++ b/geneit_app/src/widgets/AsyncWidget.tsx @@ -12,6 +12,7 @@ export function AsyncWidget(p: { load: () => Promise; errMsg: string; build: () => React.ReactElement; + ready?: boolean; }): React.ReactElement { const [state, setState] = useState(State.Loading); @@ -35,7 +36,7 @@ export function AsyncWidget(p: { load(); }); - if (state === State.Loading) + if (state === State.Loading || p.ready === false) return (
Réessayer
); - + console.log(p, counter.current); return p.build(); }