From 8aafe46246bf1e8e6b658971c2f5d3c3f6dbfc84 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Thu, 28 Nov 2024 12:33:05 +0000 Subject: [PATCH] chore: fix build --- .../api/get-bot-visits/botVisitDatabase.ts | 2 +- src/app/personalization/hooks/use-cart.ts | 2 +- src/env.ts | 15 ++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/bot-firewall/api/get-bot-visits/botVisitDatabase.ts b/src/app/bot-firewall/api/get-bot-visits/botVisitDatabase.ts index dee8f3ad..b935ce43 100644 --- a/src/app/bot-firewall/api/get-bot-visits/botVisitDatabase.ts +++ b/src/app/bot-firewall/api/get-bot-visits/botVisitDatabase.ts @@ -56,7 +56,7 @@ export const saveBotVisit = async (botData: EventResponseBotData, visitorId: str requestId: botData.requestId, timestamp: botData.time, botResult: botData.bot.result, - botType: botData.bot.type, + botType: botData.bot.type ?? '', userAgent: botData.userAgent, url: botData.url, }); diff --git a/src/app/personalization/hooks/use-cart.ts b/src/app/personalization/hooks/use-cart.ts index 5127fb74..97a1aabd 100644 --- a/src/app/personalization/hooks/use-cart.ts +++ b/src/app/personalization/hooks/use-cart.ts @@ -51,7 +51,7 @@ export function useCart() { }); return (await response.json()) as AddCartItemResponse; }, - onSuccess: (data: AddCartItemResponse) => refetchCartOnSuccess(data), + onSuccess: () => refetchCartOnSuccess(), }); const removeCartItemMutation = useMutation({ diff --git a/src/env.ts b/src/env.ts index b5108695..3f2f5b7f 100644 --- a/src/env.ts +++ b/src/env.ts @@ -129,12 +129,13 @@ export const env = createEnv({ NEXT_PUBLIC_INKEEP_INTEGRATION_ID: process.env.NEXT_PUBLIC_INKEEP_INTEGRATION_ID, NEXT_PUBLIC_INKEEP_ORG_ID: process.env.NEXT_PUBLIC_INKEEP_ORG_ID, }, - isServer: - // Comprehensive server check - // https://github.com/t3-oss/t3-env/issues/154 + // Comprehensive server check + // https://github.com/t3-oss/t3-env/issues/154 + isServer: Boolean( typeof window === 'undefined' || - 'Deno' in window || - globalThis.process.env['NODE_ENV'] === 'test' || - !!globalThis.process.env['JEST_WORKER_ID'] || - !!globalThis.process.env['VITEST_WORKER_ID'], + 'Deno' in window || + process.env['NODE_ENV'] === 'test' || + process.env['JEST_WORKER_ID'] || + process.env['VITEST_WORKER_ID'], + ), });