enable mocks in SB

This commit is contained in:
MTG2000
2022-04-20 13:58:41 +03:00
parent bae8f3a2d5
commit 2fcede9299
3 changed files with 7 additions and 3 deletions

View File

@@ -1,2 +1,3 @@
REACT_APP_ENABLE_MOCKS= true
REACT_APP_ENABLE_MOCKS= true
STORYBOOK_ENABLE_MOCKS= true

View File

@@ -1,2 +1,3 @@
REACT_APP_ENABLE_MOCKS= true
REACT_APP_ENABLE_MOCKS= true
STORYBOOK_ENABLE_MOCKS= true

View File

@@ -21,8 +21,10 @@ import { apolloClient } from '../apollo';
// -------------------------------------------
// -------------------------------------------
console.log('HIIII ', process.env);
if (process.env.REACT_APP_ENABLE_MOCKS) {
if (process.env.STORYBOOK_ENABLE_MOCKS) {
worker.start({
onUnhandledRequest: 'bypass'
})