Skip to content

Commit c4472c3

Browse files
cursor[bot]cursoragentsergical
authored
fix(nav): Add trailing slash to pagination nav links (#17516)
## DESCRIBE YOUR PR Addresses user feedback from docs.sentry.io (DOCS-AMX): "All previous and next links are missing a trailing slash." The `PaginationNav` component (previous/next page links at the bottom of docs pages) was generating hrefs as `/${node.path}` without a trailing slash. This was inconsistent with sidebar navigation links, which correctly include a trailing slash (`'/' + node.path + '/'`). - Changed `href={`/${node.path}`}` to `href={`/${node.path}/`}` in `src/components/paginationNav.tsx` ## IS YOUR CHANGE URGENT? - [x] None: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs - [ ] PR was reviewed and approved by a member of the docs team <div><a href="https://cursor.com/agents/bc-24b9e842-e134-49a5-b001-106a55a841c0"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/automations/ed76aa5d-e6c6-4626-bce4-30117ff0e2de"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-automation-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-automation-light.png"><img alt="View Automation" width="141" height="28" src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Sergiy Dybskiy <s@serg.tech>
1 parent 15a73a8 commit c4472c3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/paginationNav.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export function PaginationNav({
88
node: PaginationNavNode;
99
title: 'Previous' | 'Next';
1010
}) {
11+
const href = node.path === '' || node.path === '/' ? '/' : `/${node.path}/`;
1112
return (
12-
<a href={`/${node.path}`} className="no-underline">
13+
<a href={href} className="no-underline">
1314
<div
1415
className={`py-3 px-4 border-2 dark:[border-color:var(--gray-4)] rounded-md transition-colors hover:[border-color:var(--accent)] ${
1516
title === 'Previous' ? 'text-left' : 'text-right'

0 commit comments

Comments
 (0)