identity-idp icon indicating copy to clipboard operation
identity-idp copied to clipboard

LG-12307: create and use SelfieCaptureEnabledContext

Open night-jellyfish opened this issue 2 years ago • 0 comments

🎫 Ticket

Part of LG-12307

🛠 Summary of changes

While discussing LG-12307 and my initial pass at it in https://github.com/18F/identity-idp/pull/10165, we realized using a React Context would be more fitting than trying to pass the selfieEnabled value back and forth through props.

While working on that, I realized the value for this already existed in the FeatureFlagContext. But to me, FeatureFlag implies that it is likely a transitory value. SelfieCaptureEnabled is also disconnected from the other value currently in FeatureFlagContext and the other value is not needed in the place I am planning to use this new context.

For those reasons, I thought it would be better to take SelfieCaptureEnabled into its own context.

This PR is the first part of this work - it (should) have no functional change, but is instead more like a refactor. It is easiest to review in the commits I broke the work out into:

night-jellyfish avatar Feb 28 '24 23:02 night-jellyfish