Changeset View
Changeset View
Standalone View
Standalone View
native/utils/avatar-utils.js
- This file was added.
// @flow | |||||
import * as React from 'react'; | |||||
import { FeatureFlagsContext } from '../components/feature-flags-provider.react.js'; | |||||
function useShouldRenderAvatars(): boolean { | |||||
const { configuration: featureFlagConfig } = | |||||
React.useContext(FeatureFlagsContext); | |||||
return featureFlagConfig['AVATARS_DISPLAY']; | |||||
tomek: We probably should transform it to boolean. `featureFlagConfig` isn't required to have… | |||||
ginsuAuthorUnsubmitted Done Inline Actionsginsu: Gotcha, flow was saying that I was getting a boolean value from this, but I will return `!! | |||||
} | |||||
export { useShouldRenderAvatars }; |
We probably should transform it to boolean. featureFlagConfig isn't required to have AVATARS_DISPLAY property. It's strange that Flow didn't catch that.