From f4bb0d19ebf08ed11b7946fb7456d8636dd78a86 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Thu, 21 Apr 2022 00:01:12 +0400 Subject: [PATCH] fix: ssr for / --- src/web/search/CommonDisplay.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/web/search/CommonDisplay.tsx b/src/web/search/CommonDisplay.tsx index 1a7cbb8..b18fffd 100644 --- a/src/web/search/CommonDisplay.tsx +++ b/src/web/search/CommonDisplay.tsx @@ -69,6 +69,8 @@ const CommonDisplay: React.FC = ({ }, }, pause: !isFirstRender, + // note that if we don't force cache-only on SSR then queryResults.fetching is true which leads to an empty page + requestPolicy: isFirstRender ? "cache-only" : "network-only", }); const queryIsEmpty =