mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[web] Add editor tabs experiment GitOrigin-RevId: 8cef265a45dbd826ad8a4df7d98e38f9bb7ec1cd
16 lines
482 B
TypeScript
16 lines
482 B
TypeScript
import getMeta from './meta'
|
|
|
|
// Should be `never` when no experiments are active. Otherwise it should be a
|
|
// union of active experiment names e.g. `'experiment1' | 'experiment2'`
|
|
|
|
export type ActiveExperiment =
|
|
| 'monthly-texlive'
|
|
| 'bibtex-visual-editor'
|
|
| 'overleaf-code'
|
|
| 'editor-tabs'
|
|
|
|
export const isInExperiment = (experiment: ActiveExperiment): boolean => {
|
|
const experiments = getMeta('ol-labsExperiments')
|
|
return Boolean(experiments?.includes(experiment))
|
|
}
|