🧑💻 Improve env variables type safety and management (#718)
Closes #679
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { fetcher } from '@/helpers/fetcher'
|
||||
import { Invitation } from '@typebot.io/prisma'
|
||||
import useSWR from 'swr'
|
||||
import { env } from '@typebot.io/lib'
|
||||
import { env } from '@typebot.io/env'
|
||||
|
||||
export const useInvitations = ({
|
||||
typebotId,
|
||||
@@ -14,7 +14,7 @@ export const useInvitations = ({
|
||||
typebotId ? `/api/typebots/${typebotId}/invitations` : null,
|
||||
fetcher,
|
||||
{
|
||||
dedupingInterval: env('E2E_TEST') === 'true' ? 0 : undefined,
|
||||
dedupingInterval: env.NEXT_PUBLIC_E2E_TEST ? 0 : undefined,
|
||||
}
|
||||
)
|
||||
if (error) onError(error)
|
||||
|
||||
Reference in New Issue
Block a user