chore: Updated redux-devtools hide with ENV.

feature/artists
mackt 4 months ago
parent f2379deea6
commit 76a8f2201d

@ -1,5 +0,0 @@
# 生产环境使用的变量
NODE_ENV = 'test'
NEXT_PUBLIC_HOST = 'http://39.103.180.196:9012'
NEXT_PUBLIC_MOBILE_HOST = 'https://m.indie.cn'

@ -1,5 +1,6 @@
# 生产环境使用的变量
NODE_ENV = 'production'
NEXT_PUBLIC_NODE_ENV = 'production'
NEXT_PUBLIC_HOST = 'http://api.indie.cn:9012'
NEXT_PUBLIC_MOBILE_HOST = 'https://m.indie.cn'

@ -1,5 +1,6 @@
# 测试环境使用的变量
NODE_ENV = 'test'
NEXT_PUBLIC_NODE_ENV = 'test'
NEXT_PUBLIC_HOST = 'http://39.103.180.196:9012'
NEXT_PUBLIC_MOBILE_HOST = 'https://m.indie.cn'

@ -274,8 +274,8 @@ const useAudioState = create<AuioState>()(
},
),
{
name: 'audio', // 浏览器调试时显示的 store 名称
enabled: true, // 是否开启调试工具(通常根据当前环境开启/关闭)
name: 'audio', // redux-devtools 中的 store 名称
enabled: process.env.NEXT_PUBLIC_NODE_ENV !== 'production', // 是否开启 redux-devtools
},
),
);

@ -87,8 +87,8 @@ const useUserStore = create<UserState>()(
},
),
{
name: 'user', // 浏览器调试时显示的 store 名称
enabled: true, // 是否开启调试工具(通常根据当前环境开启/关闭)
name: 'user', // redux-devtools 中的 store 名称
enabled: process.env.NEXT_PUBLIC_NODE_ENV !== 'production', // 是否开启 redux-devtools
},
),
);

Loading…
Cancel
Save