diff --git a/pages/blog/index.tsx b/pages/blog/index.tsx index 37958cec4308..2f963f4de612 100644 --- a/pages/blog/index.tsx +++ b/pages/blog/index.tsx @@ -32,26 +32,26 @@ export default function BlogIndexPage() { return i2Date.getTime() - i1Date.getTime(); }) - : [] + : [], ); const [isClient, setIsClient] = useState(false); const onFilter = (data: IBlogPost[]) => setPosts(data); const toFilter = [ { - name: 'type' + name: 'type', }, { name: 'authors', - unique: 'name' + unique: 'name', }, { - name: 'tags' - } + name: 'tags', + }, ]; const clearFilters = () => { router.push(`${router.pathname}`, undefined, { - shallow: true + shallow: true, }); }; const showClearFilters = Object.keys(router.query).length > 0; @@ -64,72 +64,90 @@ export default function BlogIndexPage() { }, []); return ( - -
-
-
+ +
+
+
-
-
+
+
Welcome to our blog! - + Find the latest and greatest stories from our community - + Want to publish a blog post? We love community stories.{' '} - + Submit yours! - + We have an RSS feed - RSS Feed, too! + RSS Feed, too!
-
+
{showClearFilters && ( )}
{Object.keys(posts).length === 0 && ( -
+
-

No post matches your filter

+

+ No post matches your filter +

)} {Object.keys(posts).length > 0 && isClient && ( -
    +
      {posts.map((post, index) => ( ))}
    )} {Object.keys(posts).length > 0 && !isClient && ( -
    - +
    +
    )}