-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Problem
The Bulletins component in front_end/src/app/(main)/components/bulletins.tsx is loaded dynamically without SSR (ssr: false). This causes a layout shift even if there are no bulletins to show because:
- During SSR/initial render, the component renders nothing
- When hydration happens on the client, the component renders and adds
mt-12margin - This shifts the content below it
The mt-12 margin is currently in the Bulletins component, but it's actually serving as spacing between the header and page content - a layout concern that shouldn't be tied to bulletins.
Consider these approaches:
- Move spacing to layout or header itself: Add the spacing directly in
layout.tsxon the content container or adjustGlobalHeaderto decouple it from the dynamically loaded Bulletins component - Server-side fetch: Make the bulletins data fetched on the server so the component can be SSR'd with the correct content/dimensions from the start
Metadata
Metadata
Assignees
Labels
No labels