Remove /tickets prefix from ticket detail URLs
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:
@@ -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 />} />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user