Skip to content

chore(cleanup): remove unused Header component from layout/ #26

Closed

Description

@gkhngyk

What's wrong

The file web/src/components/layout/header.tsx exports a Header
component that is not imported or rendered anywhere in the
codebase. The dashboard layout uses Sidebar + MobileNav for
navigation — there's no top-bar header. The Header component is
dead code left over from an earlier layout.

You can confirm with a quick search:

grep -rn "from.*layout/header" web/src
# returns nothing

Why this matters

  • Dead code adds noise to the codebase — newcomers (you, today!) spend
    time figuring out whether it's used, where, and why
  • TypeScript and lint still process it on every build
  • It depends on hooks and utilities (useRouter, supabase client,
    analytics reset) that read as "in use" but actually aren't, which
    can mislead refactors
  • Open-source projects benefit visibly from a tidy file tree — it
    signals care

Where to fix

Delete this file (and only this file):

  • web/src/components/layout/header.tsx

⚠️ DO NOT touch

There is a different header component that is actively used on
the sign-in / sign-up pages and the rest of the marketing site:

  • web/src/components/marketing/marketing-header.tsx — keep this
    exactly as is

The two files have similar names but live in different folders. Make
sure you're deleting the one in layout/, not marketing/.

How to verify

After deleting the file, run:

cd web && yarn typecheck   # should pass with zero errors
yarn lint                  # should pass with zero errors
yarn dev                   # open the app, click around

Sanity check in the browser:

  • Sign-in page (/sign-in) — top header still visible with logo +
    Sign in / Create account buttons
  • Sign-up page (/sign-up) — same as above
  • Dashboard (/dashboard) — sidebar on the left works, no missing
    element where a header would have been (there never was one)
  • Settings (/dashboard/settings) — same

If anything looks broken on the dashboard, you may have deleted the
wrong file — git checkout the change and try again, double-checking
the path.

Hint

The file you're deleting also imports the reset helper from
@/lib/analytics. After deletion, run yarn typecheck — if it
complains about unused exports anywhere, that's a separate issue
(don't fix it here, keep the PR focused on the deletion).

Contribution guide

See CONTRIBUTING.md for branch naming, commit
conventions, and PR workflow.

Activity

  1. added
    good first issue
    help wanted
    on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions