Skip to content

Fix: Remove duplicate footer from blog posts - #2

Merged
rmashate merged 1 commit into
mainfrom
fix/remove-duplicate-footer
Nov 12, 2025
Merged

Fix: Remove duplicate footer from blog posts#2
rmashate merged 1 commit into
mainfrom
fix/remove-duplicate-footer

Conversation

@rmashate

Copy link
Copy Markdown
Owner

Problem

Blog posts were displaying duplicate footers at the bottom of each post.

Root Cause

The footer component was being rendered twice:

  1. In app/layout.tsx (root layout)
  2. In app/(post)/layout.tsx (post layout)

Since Next.js nests layouts, the post layout inherits from the root layout, causing the footer to appear twice.

Solution

Removed the Footer component and its import from app/(post)/layout.tsx. The footer will now only render once from the root layout, appearing consistently across all pages including blog posts.

Changes

  • Removed import Footer from "../footer";
  • Removed <Footer /> component from the PostLayout return statement

Testing

After deployment, verify that:

  • Blog posts display only one footer
  • Homepage and other pages still display the footer correctly

The footer was rendering twice on blog posts - once from the root layout (app/layout.tsx) and once from the post layout (app/(post)/layout.tsx). Removed the footer import and component from the post layout to fix the duplication issue.
@vercel

vercel Bot commented Nov 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
blog Ready Ready Preview Comment Nov 12, 2025 7:15am

@rmashate
rmashate merged commit 5e81d49 into main Nov 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant