Mv/hackaton/repo page refresh/add flag
Created by: miveronese
Feature flag to show/hide the new page/components.
1.To add the new feature flag, go to the graphql console (in api/console) and create a feature flag and set it to true.
mutation CreateFeatureFlag{
createFeatureFlag(
name: "repo-refresh",
value: true,
){
__typename
}
}
- To use the flag You can use it in the RepositoriesFileTreePage.tsx to conditionally display the new TreePage and other components .
return (
<>
….
{!loading && getFlags(data).get("repo-refresh") ? (
<div> an old components </p>
) : <div> a new components </div>}
…
)