Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

chrome: navbar home-route check assumes single locale, no basePath

Đang mở
#115 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
next.js, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Read components/site/Chrome.tsx and next.config.ts to understand the current route assumptions. The issue describes work to do before adding locale routing, a basePath, or another prefix rewriting layer; first check whether any of those are planned. Done means every home route check in Chrome.tsx handles the chosen routing setup without restoring the navbar tone bug described in #112.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement future med-priority revisit

Tracking comment from Gemini's review of #114.

Background

After #114, components/site/Chrome.tsx derives the navbar tone from:

const effectiveActive = pathname === "/" && scrolled ? active : "intro";

The pathname === "/" literal is correct today — the static export ships a single locale and next.config.ts has no basePath. If we ever add either, this check (and any other Chrome.tsx guard that conflates "home" with the literal "/" route) will silently mis-fire and the original #112 symptom returns: the navbar paints in a dark-section tone on what is functionally the home page.

When this matters

Before adding any of:

  • i18n routing (/en/, /de/, …)
  • a basePath in next.config.ts
  • any other prefix-rewriting layer that changes the home pathname

…audit components/site/Chrome.tsx for pathname === "/" and replace it with a routing-aware home check (e.g. strip locale prefix from pathname before comparing, or thread the home route through a config helper).

Out of scope for #114; filed so the assumption is documented and discoverable.

Ngôn ngữ chính
TypeScript
Star
3
Fork
0
Merge trung bình
12 giờ 41 phút
Pull request đã merge (30 ngày)
70

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của decdn/website

Tất cả issue của decdn/website

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.