Skip to content

Commit

Permalink
fix(envdetector): envDetector components were missing children props …
Browse files Browse the repository at this point in the history
…declaration (#91)
  • Loading branch information
karelhala authored Jan 26, 2024
1 parent 6337a6a commit d9fb7ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface EnvDetectorProps {
currentEnvironment: Environment;
}

export const EnvDetector: React.FunctionComponent<EnvDetectorProps> = (props) => {
export const EnvDetector: React.FunctionComponent<React.PropsWithChildren<EnvDetectorProps>> = (props) => {
const environment = React.useMemo(
() => Array.isArray(props.onEnvironment) ? props.onEnvironment : [ props.onEnvironment ],
[ props.onEnvironment ]
Expand All @@ -28,7 +28,7 @@ interface InsightsBetaDetectorProps extends Omit<EnvDetectorProps, 'currentEnvir
insights: InsightsType;
}

export const InsightsEnvDetector: React.FunctionComponent<InsightsBetaDetectorProps> = (props) => {
export const InsightsEnvDetector: React.FunctionComponent<React.PropsWithChildren<InsightsBetaDetectorProps>> = (props) => {
const currentEnvironment: Environment = React.useMemo(() => {
const isBeta = props.insights.chrome.isBeta();
const env: NonBetaEnvironment = props.insights.chrome.getEnvironment();
Expand Down

0 comments on commit d9fb7ac

Please sign in to comment.