Skip to content

Commit

Permalink
chore: clarify error state with search url
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Sep 22, 2024
1 parent 9e3d684 commit b0b79b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/ImportStateFromRtt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export default function ImportStateFromRtt({ importStateFromRttService, disabled
}

if (uriPath[1] !== 'service') {
setErrors(['Invalid Realtime Trains URL (wrong path)'])
if (uriPath[1] === 'search') {
setErrors(['This looks like an RTT search link. You need to provide the URL for a particular service into this tool.'])
} else {
setErrors(['Invalid Realtime Trains URL (wrong path)'])
}
setImporting(false)
return
}
Expand Down Expand Up @@ -242,7 +246,7 @@ export default function ImportStateFromRtt({ importStateFromRttService, disabled

{!serviceData && (
<label>
Realtime Trains URL
Realtime Trains service URL
<input
className="textInput"
disabled={importing}
Expand Down

0 comments on commit b0b79b8

Please sign in to comment.