diff --git a/CODEOWNERS b/CODEOWNERS index 403f5b5949..222ebfae9b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,5 +4,6 @@ src/hw @ledgerhq/live-devices src/manager @ledgerhq/live-devices src/apps @ledgerhq/live-devices src/notifications @ledgerhq/live-hub +src/featureFlags @ledgerhq/live-hub src/exchange @ledgerhq/live-platform-and-services src/platform @ledgerhq/live-platform-and-services \ No newline at end of file diff --git a/src/featureFlags/FeatureToggle.tsx b/src/featureFlags/FeatureToggle.tsx index 0fbe8ca6ac..c9ce7f6835 100644 --- a/src/featureFlags/FeatureToggle.tsx +++ b/src/featureFlags/FeatureToggle.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from "react"; +import React, { ReactNode } from "react"; import useFeature from "./useFeature"; import { FeatureId } from "./types"; @@ -13,12 +13,12 @@ export const FeatureToggle = ({ feature: featureId, fallback, children, -}: Props): ReactNode => { +}: Props): JSX.Element => { const feature = useFeature(featureId); if (!feature || !feature.enabled) { - return fallback ?? null; + return <>{fallback || null}; } - return children ?? null; + return <>{children || null}; };