Skip to content

refactor: Fix SSR and remove unnecessary "use client" directives #31

@Nicolapps

Description

@Nicolapps

Problem The root layout (src/app/layout.tsx) is marked "use client", which forces the entire app into client-side rendering and blocks Next.js's built-in metadata API (title, description, Open Graph). The <title> tag is manually hardcoded in <head> instead. Multiple page components that could benefit from server rendering are also client components unnecessarily.

Proposed Solution

  • Extract SessionProvider, ConvexClientProvider, and Toaster into a <Providers> client component
  • Make the root layout a Server Component and use export const metadata for SEO
  • Audit all "use client" directives and remove those that aren't needed
  • This improves initial page load performance and enables proper SEO metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions