From 3ba45c3b59b12888b9ad21cd77c64d4712e0f993 Mon Sep 17 00:00:00 2001 From: Ben Awad Date: Tue, 25 Aug 2020 13:55:18 -0500 Subject: [PATCH] fix build/ts errors --- web/src/utils/useGetPostFromUrl.ts | 2 +- web/src/utils/withApollo.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/utils/useGetPostFromUrl.ts b/web/src/utils/useGetPostFromUrl.ts index b09f6225..cce1e5fb 100644 --- a/web/src/utils/useGetPostFromUrl.ts +++ b/web/src/utils/useGetPostFromUrl.ts @@ -6,7 +6,7 @@ import { useGetIntId } from "./useGetIntId"; export const useGetPostFromUrl = () => { const intId = useGetIntId(); return usePostQuery({ - pause: intId === -1, + skip: intId === -1, variables: { id: intId, }, diff --git a/web/src/utils/withApollo.ts b/web/src/utils/withApollo.ts index 77eb029f..d5e7e2f3 100644 --- a/web/src/utils/withApollo.ts +++ b/web/src/utils/withApollo.ts @@ -9,8 +9,9 @@ const createClient = (ctx: NextPageContext) => credentials: "include", headers: { cookie: - (typeof window === "undefined" ? ctx.req?.headers.cookie : undefined) || - "", + (typeof window === "undefined" + ? ctx?.req?.headers.cookie + : undefined) || "", }, cache: new InMemoryCache({ typePolicies: {