Skip to content
Snippets Groups Projects

Adding feature flag functionality

Merged Tore.Brede requested to merge feature_flag_frontend into master
All threads resolved!
5 files
+ 79
21
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 15
0
 
import { createContext, useContext } from 'react'
 
 
export interface IFeatureContext {
 
// Controls whether the contact person at unit field is shown in the register new guest wizard
 
displayContactAtUnit: boolean
 
// Controls whether the optional field is shown in the register new guest wizard
 
displayComment: boolean
 
}
 
 
export const FeatureContext = createContext<IFeatureContext>({
 
displayContactAtUnit: true,
 
displayComment: true,
 
})
 
 
export const useFeatureContext = () => useContext(FeatureContext)
Loading