(props: Props)
| 29 | }, |
| 30 | ): ComponentType<Props> => { |
| 31 | const WithExperiment = (props: Props): ReactElement => { |
| 32 | const featureValue = useFeature(options.feature); |
| 33 | |
| 34 | if (featureValue !== options.value) { |
| 35 | const FallbackComponent = options?.fallback; |
| 36 | |
| 37 | return FallbackComponent ? <FallbackComponent {...props} /> : null; |
| 38 | } |
| 39 | |
| 40 | return <WrappedComponent {...props} />; |
| 41 | }; |
| 42 | |
| 43 | WithExperiment.displayName = 'WithExperiment'; |
| 44 |
nothing calls this directly
no test coverage detected