2
0

fix(docker): 🐛 Runtime public environment

This commit is contained in:
Baptiste Arnaud
2022-06-21 10:36:41 +02:00
parent ea765640cf
commit e03fe9f7d9
54 changed files with 349 additions and 164 deletions

View File

@ -29,7 +29,7 @@ import {
} from 'services/typebots/typebots'
import { fetcher, preventUserFromRefreshing } from 'services/utils'
import useSWR from 'swr'
import { isDefined, isEmpty, isNotDefined, omit } from 'utils'
import { env, isDefined, isNotDefined, omit } from 'utils'
import { GroupsActions, groupsActions } from './actions/groups'
import { blocksAction, BlocksActions } from './actions/blocks'
import { variablesAction, VariablesActions } from './actions/variables'
@ -395,7 +395,7 @@ export const useFetchedTypebot = ({
},
Error
>(`/api/typebots/${typebotId}`, fetcher, {
dedupingInterval: isEmpty(process.env.NEXT_PUBLIC_E2E_TEST) ? undefined : 0,
dedupingInterval: env('E2E_TEST') === 'enabled' ? 0 : undefined,
})
if (error) onError(error)
return {