Understanding the Error:This error occurs when you try to access the global window object within a Next. js server-side rendered (SSR) component or a statically generated (SSG) page
Server-Side Rendering (SSR): In React 18, applications can leverage SSR to pre-render HTML on the server, improving initial page load performance and SEO