From dacaf6f75ba7e8448dc3f09e8c91ae3a20677554 Mon Sep 17 00:00:00 2001 From: Jack MB Date: Tue, 14 Nov 2023 11:20:40 +0100 Subject: [PATCH] hide search results whilst validating --- pages/search.tsx | 136 ++++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/pages/search.tsx b/pages/search.tsx index 52602773..0b941891 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -74,7 +74,7 @@ export default function SearchPage({ {isValidating && ( -
+

@@ -98,73 +98,75 @@ export default function SearchPage({

)} -
- {!isEmpty(data.shows) && ( -
-
- -

Shows

-
- -
- -
    - {data.shows.map((show) => ( -
  • - -
  • - ))} -
-
-
- )} - - {!isEmpty(data.articles) && ( -
-
- -

News

-
- -
- -
    - {data.articles.map((article) => ( -
  • - -
  • - ))} -
-
-
- )} - - {!isEmpty(data.artists) && ( -
-
- -

Artists

-
- -
- -
    - {data.artists.map((artist) => { - return ( -
  • - + {!isValidating && ( +
    + {!isEmpty(data.shows) && ( +
    +
    + +

    Shows

    +
    + +
    + +
      + {data.shows.map((show) => ( +
    • +
    • - ); - })} -
    -
    -
    - )} -
    + ))} +
+
+
+ )} + + {!isEmpty(data.articles) && ( +
+
+ +

News

+
+ +
+ +
    + {data.articles.map((article) => ( +
  • + +
  • + ))} +
+
+
+ )} + + {!isEmpty(data.artists) && ( +
+
+ +

Artists

+
+ +
+ +
    + {data.artists.map((artist) => { + return ( +
  • + +
  • + ); + })} +
+
+
+ )} +
+ )}