LP lock links omit the /token|lp/ URL segment, causing wrong-type lookups on the detail page
Débutant
buggood first issuefrontendMaybe RewardedGrantFox OSSThird Campaign
0 ★
Poids du clone léger
Mise à jour
Description
## Summary
Lock detail links should include the lock's kind in the URL, e.g. `/app/lock/lp/:id` or `/app/lock/token/:id` — that's how `src/pages/LockDetail.tsx` (line 53) decides whether to fetch a token lock or an LP lock. `src/components/locks/LockTable.tsx:110` does this correctly (`` `/app/lock/${lock.kind ?? "token"}/${lock.id}` ``), but two other call sites don't:
- `src/components/locks/LockCard.tsx:114` — links to `` `/app/lock/${lock.id}` `` with no kind segment
- `src/components/locks/CreateLpLockForm.tsx:182` — navigates to `` `/app/lock/${id}` `` right after creating an LP lock, with no kind segment
## Problem
Both cases fall through to the fallback route `/app/lock/:id` in `src/App.tsx` (line 54), and `LockDetail.tsx` defaults anything not matching `/app/lock/lp/` to `"token"` (line 53). So an LP lock opened via a `LockCard`, or the redirect right after creating one, gets looked up as if it were a token lock — wrong contract, wrong/missing data.
## Task
Include the kind segment in both links, matching the `LockTable.tsx` pattern:
- `LockCard.tsx:114`: `` `/app/lock/${lock.kind ?? "token"}/${lock.id}` ``
- `CreateLpLockForm.tsx:182`: since this form only ever creates LP locks, `` `/app/lock/lp/${id}` ``
## Acceptance Criteria
- [ ] Clicking an LP lock's `LockCard` opens its detail page with correct LP data
- [ ] Creating an LP lock navigates to its detail page with correct LP data, not the token-lock view
Issues similaires
Tout voir
TypeScript
Débutant
[Good First Issue] 🐡 Add new Japan Fact 251 - Beginner-Friendly Open-source Contribution
## 🟢 Good First Issue: Add Japan Fact #251 — Beginner-Friendly Open Source Contribution ![Time: <1 minute](h…
Mise à jour
TypeScript
Débutant
Error bucketing
It would be great to bucket the errors in different types i.e. Code exception, configuration exception, envir…
Mise à jour
TypeScript
Débutant
Support for Cucumber v8 NDJSON
The JSON formatter in version 8 of Cucumber is in maintenance mode and will at some point be deprecated. T…
Mise à jour