Added add vehicle page - #71
Conversation
✅ Deploy Preview for able-alliance ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile SummaryThis PR is broader than the title suggests — beyond redesigning the "add vehicle" form (removing the separate
Confidence Score: 4/5Needs two P1 fixes before merge — duplicate API calls and broken map coordinates. Two P1 issues block a clean merge: the duplicate locations fetch wastes network calls on every render, and the map always shows default coordinates making it non-functional for its core purpose. The remaining findings are style/convention P2s that don't block functionality. src/app/rides/[id]/page.tsx requires the most attention — remove the duplicate fetchLocations effect and fix the locations state to store coordinates alongside names so the map renders correctly. Important Files Changed
|
| background-color: transparent; | ||
| color: #16a34a; | ||
| border: 1px solid #16a34a; | ||
| border-radius: 0.4rem; | ||
| font-size: 1.8rem; | ||
| font-weight: 600; | ||
| font-family: var(--font-paragraph); | ||
| cursor: pointer; | ||
| transition: background 0.15s; | ||
|
|
||
| &:hover:not(:disabled) { | ||
| background-color: rgba(22, 163, 74, 0.06); | ||
| } | ||
|
|
There was a problem hiding this comment.
Hardcoded color values — use CSS variables instead
greenOutlineButton uses hardcoded hex/rgba values (#16a34a, rgba(22, 163, 74, 0.06)) instead of CSS variables from the global stylesheet. The same pattern appears elsewhere in the file (e.g. color: #000 on .pageTitle, color: rgba(34, 7, 11, 0.5) on .stopLabel). Per project convention, all color values should reference CSS variables.
Rule Used: Use color variables from the global stylesheet (`s... (source)
Learnt From
GTBitsOfGood/design-system#61
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| body: JSON.stringify({ | ||
| vehicleId, | ||
| vehicleId: name, |
There was a problem hiding this comment.
vehicleId is now silently set to equal name
After removing the separate vehicleId form field, the payload sends vehicleId: name (the "Vehicle Number" field). If two vehicles are created with the same vehicle number / name, they will have identical vehicleId values. If the backend schema enforces uniqueness on vehicleId this will cause confusing errors; if it doesn't, it creates duplicate IDs. Consider clarifying in a comment that this is intentional and verifying the uniqueness constraint is in place.
No description provided.