dengliming opened a new issue, #1134:
URL: https://github.com/apache/shenyu-website/issues/1134

   Several hard-coded links in the site's React components are broken or break 
the zh locale.
   
   ## Broken links
   
   - `src/pages/users.tsx:57` — the first row of user logos renders `<a 
href="noopener noreferrer" target="_blank">`. Clicking any logo in that row 
opens the relative URL `noopener noreferrer` (404). Should be `href={user.link} 
rel="noopener noreferrer"` like the other two rows.
   - `src/components/Footer.tsx:29` — `href='/docs/index/'` is a 404 
(`docs/index.md` has no slug, so it is served at `/docs/`).
   - `src/components/Footer.tsx:46` — 
`href='./community/contributor-guide#join-the-discussion'` is a relative path; 
it only works because the footer is rendered on the home page. The anchor does 
not exist on the zh page either (heading is `### 参与讨论`).
   - `src/pages/versions.tsx:93` — release-notes link is built as 
`releases/tag/v${name}`; for `2.3.0-Legacy` that yields `v2.3.0-Legacy`, which 
is not a real tag.
   - `src/data/user.js:10` — `link: "http:/www.safesoftcorp.com"` (single 
slash). Lines 24–26 and 33 have `link: ""`, so clicking those logos reloads the 
page.
   
   ## Locale bugs
   
   - `src/components/Footer.tsx:28-38` uses raw `<a href='/download'>`, 
`/news`, `/blog`, `/community/contributor-guide`. From `/zh/` these jump to the 
English site. Use `@docusaurus/Link` with `to=` so the locale prefix is added.
   - `src/pages/event.tsx:7` imports `Link` from `react-router-dom` and builds 
relative `'event/' + src` paths from a trailing-slash check. `@docusaurus/Link` 
with `to={`/event/${src}`}` is simpler and locale-safe.
   - `src/pages/index.tsx:175` — `autoRedirect` only matches 
`navigator.language === 'zh-cn'` (not `zh`, `zh-TW`, `zh-SG`) and hard-codes 
`/zh/` ignoring `baseUrl`.
   
   ## `src/components/Contributors.tsx` (Team page)
   
   - line 6: default repo is `apache/incubator-shenyu` (stale; GitHub redirects 
but should be `apache/shenyu`).
   - line 9: `per_page=10000` is capped at 100 by the GitHub API, so at most 
100 contributors are shown per repo; needs pagination.
   - line 5: `useEffect` has no dependency array, so a repo that returns `[]` 
refetches on every render.
   - line 28: `style={{ whiteSpace: 'nowrap' }}` is JSX syntax inside a raw 
HTML string; the browser gets an invalid attribute. Should be 
`style="white-space:nowrap"`.
   
   ## Minor
   
   - `src/pages/document.tsx:24-29` and 
`src/components/DownloadCompoent.tsx:367-370`: the `useEffect` cleanup is 
written as `return document.removeEventListener('click', () => …)`, which runs 
immediately with a new function and removes nothing. Should be `return () => 
document.removeEventListener('click', closeList)`.
   - `src/pages/versions.tsx:35/59`: heading ids are swapped (`id="next"` on 
"Current version", `id="latest"` on "Next version").
   - `src/pages/users.tsx:42`: `Layout title={tagline}` gives the Users page 
the site tagline as its title.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to