Skip to content

Commit

Permalink
Always show camera recordings in sidebar regardless of state
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored and blakeblackshear committed Apr 10, 2022
1 parent 045aac8 commit a22a33f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions web/src/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Sidebar() {
matches ? (
<Fragment>
<Separator />
{Object.entries(cameras).map(([camera]) => (
{Object.keys(cameras).map((camera) => (
<Destination key={camera} href={`/cameras/${camera}`} text={camera} />
))}
<Separator />
Expand All @@ -34,18 +34,14 @@ export default function Sidebar() {
matches ? (
<Fragment>
<Separator />
{Object.entries(cameras).map(([camera, conf]) => {
if (conf.record.enabled) {
return (
<Destination
path={`/recording/${camera}/:date?/:hour?/:seconds?`}
href={`/recording/${camera}`}
text={camera}
/>
);
}
return null;
})}
{Object.keys(cameras).map((camera) => (
<Destination
key={camera}
path={`/recording/${camera}/:date?/:hour?/:seconds?`}
href={`/recording/${camera}`}
text={camera}
/>
))}
<Separator />
</Fragment>
) : null
Expand Down

0 comments on commit a22a33f

Please sign in to comment.