From eb7ed0c524f50f8a08c9ad598dbd7f77ff616aaf Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 11 Jul 2023 21:28:19 +0200 Subject: [PATCH] don't render until we have a GET value --- .../src/contexts/features/FeaturesLoader.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/interface/src/contexts/features/FeaturesLoader.tsx b/interface/src/contexts/features/FeaturesLoader.tsx index 985ac30cf..38e5e0196 100644 --- a/interface/src/contexts/features/FeaturesLoader.tsx +++ b/interface/src/contexts/features/FeaturesLoader.tsx @@ -9,15 +9,17 @@ import * as FeaturesApi from 'api/features'; const FeaturesLoader: FC = (props) => { const { data: features } = useRequest(FeaturesApi.readFeatures); - return ( - - {props.children} - - ); + if (features) { + return ( + + {props.children} + + ); + } }; export default FeaturesLoader;