Always show camera recordings in sidebar regardless of state (#2846)

This commit is contained in:
Nicolas Mowen 2022-04-10 08:13:30 -06:00 committed by GitHub
parent 44a2b54773
commit 162e275ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 />
@ -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