🐛 Fix storybook bug when build

pull/2064/head
Jérémy Rialland 2022-03-17 15:48:47 +01:00 committed by Johan Girod
parent b901b7dfad
commit 909fa4bb3e
1 changed files with 9 additions and 4 deletions

View File

@ -149,13 +149,18 @@ export const getBranch = () => {
* or hide some features.
* @returns boolean
*/
export const isProduction = () =>
import.meta.env.PROD && ['master', 'next'].includes(getBranch())
export const isProduction = () => {
return import.meta.env.PROD && ['master', 'next'].includes(getBranch())
}
/**
* Is a feature branche
* @returns boolean
*/
export const isStaging = () => import.meta.env.PROD && !isProduction()
export const isStaging = () => {
return import.meta.env.PROD && !isProduction()
}
export const isDevelopment = () => import.meta.env.DEV
export const isDevelopment = () => {
return import.meta.env.DEV
}