From bb2f79e09dd4776d611e4751ede1cbb43340fba0 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 16 Dec 2023 17:31:12 +0100
Subject: fix(build): handle Next.js errors and warnings during build

* extract Blog component from BlogPage (paginated) and extract Article
component from ArticlePage to avoid `Cannot read properties` errors due
to fallback route
* fix sitemap build (cjs not supported)
* fix eslint warnings (react/jsx-no-literals)
* update `start` script since I'm using standalone output
* update `postbuild` script since we need to copy public and static
files to standalone directory (Next.js does not handle it itself
because we should use a CDN...)
---
 src/components/organisms/nav/main-nav/main-nav.tsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'src/components/organisms/nav/main-nav/main-nav.tsx')

diff --git a/src/components/organisms/nav/main-nav/main-nav.tsx b/src/components/organisms/nav/main-nav/main-nav.tsx
index 5a19399..57d8d6e 100644
--- a/src/components/organisms/nav/main-nav/main-nav.tsx
+++ b/src/components/organisms/nav/main-nav/main-nav.tsx
@@ -28,10 +28,19 @@ const MainNavWithRef: ForwardRefRenderFunction<HTMLElement, MainNavProps> = (
 
   return (
     <Nav {...props} className={wrapperClass} ref={ref}>
-      <NavList isInline spacing="2xs">
+      <NavList
+        isInline
+        // eslint-disable-next-line react/jsx-no-literals
+        spacing="2xs"
+      >
         {items.map(({ id, ...link }) => (
           <NavItem key={id}>
-            <NavLink {...link} isStack variant="main" />
+            <NavLink
+              {...link}
+              isStack
+              // eslint-disable-next-line react/jsx-no-literals
+              variant="main"
+            />
           </NavItem>
         ))}
       </NavList>
-- 
cgit v1.2.3

