Skip to content

Commit

Permalink
recordings is taken by nginx so refresh fails - change base to recording
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm authored and blakeblackshear committed Jun 5, 2021
1 parent 0d96c35 commit 7b3abe3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function App() {
<AsyncRoute path="/cameras/:camera" getComponent={Routes.getCamera} />
<AsyncRoute path="/events/:eventId" getComponent={Routes.getEvent} />
<AsyncRoute path="/events" getComponent={Routes.getEvents} />
<AsyncRoute path="/recordings/:camera/:date?/:hour?/:seconds?" getComponent={Routes.getRecording} />
<AsyncRoute path="/recording/:camera/:date?/:hour?/:seconds?" getComponent={Routes.getRecording} />
<AsyncRoute path="/debug" getComponent={Routes.getDebug} />
<AsyncRoute path="/styleguide" getComponent={Routes.getStyleGuide} />
<Cameras default path="/" />
Expand Down
6 changes: 3 additions & 3 deletions web/src/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export default function Sidebar() {
) : null
}
</Match>
<Match path="/recordings/:camera/:date?/:hour?/:seconds?">
<Match path="/recording/:camera/:date?/:hour?/:seconds?">
{({ matches }) =>
matches ? (
<Fragment>
<Separator />
{cameras.map((camera) => (
<Destination
path={`/recordings/${camera}/:date?/:hour?/:seconds?`}
href={`/recordings/${camera}`}
path={`/recording/${camera}/:date?/:hour?/:seconds?`}
href={`/recording/${camera}`}
text={camera}
/>
))}
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/RecordingPlaylist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function RecordingPlaylist({ camera, recordings, selectedDate, se
}`}
>
<div className="flex-1">
<Link href={`/recordings/${camera}/${recording.date}/${item.hour}`} type="text">
<Link href={`/recording/${camera}/${recording.date}/${item.hour}`} type="text">
{item.hour}:00
</Link>
</div>
Expand Down Expand Up @@ -87,7 +87,7 @@ export function EventCard({ camera, event, delay }) {
const duration = addSeconds(new Date(0), differenceInSeconds(end, start));
const seconds = Math.max(differenceInSeconds(start, startOfHour(start)) - delay - 10, 0);
return (
<Link className="" href={`/recordings/${camera}/${format(start, 'yyyy-MM-dd')}/${format(start, 'HH')}/${seconds}`}>
<Link className="" href={`/recording/${camera}/${format(start, 'yyyy-MM-dd')}/${format(start, 'HH')}/${seconds}`}>
<div className="flex flex-row mb-2">
<div className="w-28 mr-4">
<img className="antialiased" src={`${apiHost}/api/events/${event.id}/thumbnail.jpg`} />
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/Cameras.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Camera({ name }) {
const href = `/cameras/${name}`;
const buttons = useMemo(() => [
{ name: 'Events', href: `/events?camera=${name}` },
{ name: 'Recordings', href: `/recordings/${name}` }
{ name: 'Recordings', href: `/recording/${name}` }
], [name]);
const icons = useMemo(
() => [
Expand Down

0 comments on commit 7b3abe3

Please sign in to comment.