fix(docker): 🐛 Runtime public environment
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { ApiToken } from 'db'
|
||||
import { fetcher } from 'services/utils'
|
||||
import useSWR, { KeyedMutator } from 'swr'
|
||||
import { isNotEmpty, sendRequest } from 'utils'
|
||||
import { env, sendRequest } from 'utils'
|
||||
|
||||
export type ApiTokenFromServer = { id: string; name: string; createdAt: string }
|
||||
|
||||
@ -25,9 +25,7 @@ export const useApiTokens = ({
|
||||
userId ? `/api/users/${userId}/api-tokens` : null,
|
||||
fetcher,
|
||||
{
|
||||
dedupingInterval: isNotEmpty(process.env.NEXT_PUBLIC_E2E_TEST)
|
||||
? 0
|
||||
: undefined,
|
||||
dedupingInterval: env('E2E_TEST') === 'enabled' ? 0 : undefined,
|
||||
}
|
||||
)
|
||||
if (error) onError(error)
|
||||
|
Reference in New Issue
Block a user