mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-05 12:06:36 -05:00
refactor: remove growthbook fragment (#58677)
This commit is contained in:
committed by
GitHub
parent
083b446a41
commit
435fb8d663
@@ -1,4 +1,4 @@
|
||||
import React, { ReactNode, useEffect } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useFeature } from '@growthbook/growthbook-react';
|
||||
import { connect } from 'react-redux';
|
||||
@@ -35,7 +35,7 @@ type StateProps = ReturnType<typeof mapStateToProps>;
|
||||
type DispatchProps = { setIsRandomCompletionThreshold: (arg: boolean) => void };
|
||||
|
||||
interface GrowthBookReduxConnector extends StateProps, DispatchProps {
|
||||
children: ReactNode;
|
||||
children: JSX.Element;
|
||||
}
|
||||
|
||||
const mapDispatchToProps = {
|
||||
@@ -72,8 +72,7 @@ const GrowthBookReduxConnector = ({
|
||||
showModalsRandomly,
|
||||
setIsRandomCompletionThreshold
|
||||
]);
|
||||
// eslint-disable-next-line react/jsx-no-useless-fragment
|
||||
return <>{children}</>;
|
||||
return children;
|
||||
};
|
||||
|
||||
export default connect(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { ReactNode, useEffect, useMemo } from 'react';
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import {
|
||||
FeatureDefinition,
|
||||
GrowthBook,
|
||||
@@ -42,7 +42,7 @@ const mapStateToProps = createSelector(
|
||||
|
||||
type StateProps = ReturnType<typeof mapStateToProps>;
|
||||
interface GrowthBookWrapper extends StateProps {
|
||||
children: ReactNode;
|
||||
children: JSX.Element;
|
||||
}
|
||||
|
||||
interface UserAttributes {
|
||||
|
||||
Reference in New Issue
Block a user