Remove /tickets prefix from ticket detail URLs
All checks were successful
Build & Push / TypeScript Check (client) (push) Successful in 15s
Build & Push / Build Server (push) Successful in 42s
Build & Push / Build Client (push) Successful in 35s

Routes and links now use /:id (e.g. /V675409888) instead of /tickets/:id.
API calls are unaffected as they go through /api/tickets/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Josh Wright
2026-03-31 12:30:10 -04:00
parent 8c86ad7bb8
commit 8bea999b93
4 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ export default function App() {
<Route element={<PrivateRoute />}>
<Route path="/" element={<Dashboard />} />
<Route path="/my-tickets" element={<MyTickets />} />
<Route path="/tickets/:id" element={<TicketDetail />} />
<Route path="/:id" element={<TicketDetail />} />
<Route element={<AdminRoute />}>
<Route path="/admin/users" element={<AdminUsers />} />
<Route path="/admin/cti" element={<AdminCTI />} />

View File

@@ -270,7 +270,7 @@ export default function Dashboard() {
{tickets.map((ticket) => (
<Link
key={ticket.id}
to={`/tickets/${ticket.displayId}`}
to={`/${ticket.displayId}`}
className="flex items-center gap-4 bg-gray-900 border border-gray-800 rounded-lg px-4 py-3 hover:border-blue-500/50 hover:bg-gray-900/80 transition-all group"
>
<div

View File

@@ -41,7 +41,7 @@ export default function MyTickets() {
{tickets.map((ticket) => (
<Link
key={ticket.id}
to={`/tickets/${ticket.displayId}`}
to={`/${ticket.displayId}`}
className="flex items-center gap-4 bg-gray-900 border border-gray-800 rounded-lg px-4 py-3 hover:border-blue-500/50 transition-all group"
>
<div

View File

@@ -54,7 +54,7 @@ export default function NewTicketModal({ onClose }: NewTicketModalProps) {
const res = await api.post('/tickets', payload)
onClose()
navigate(`/tickets/${res.data.displayId}`)
navigate(`/${res.data.displayId}`)
} catch {
setError('Failed to create ticket')
} finally {