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 ? ( matches ? (
<Fragment> <Fragment>
<Separator /> <Separator />
{Object.entries(cameras).map(([camera]) => ( {Object.keys(cameras).map((camera) => (
<Destination key={camera} href={`/cameras/${camera}`} text={camera} /> <Destination key={camera} href={`/cameras/${camera}`} text={camera} />
))} ))}
<Separator /> <Separator />
@ -34,18 +34,14 @@ export default function Sidebar() {
matches ? ( matches ? (
<Fragment> <Fragment>
<Separator /> <Separator />
{Object.entries(cameras).map(([camera, conf]) => { {Object.keys(cameras).map((camera) => (
if (conf.record.enabled) { <Destination
return ( key={camera}
<Destination path={`/recording/${camera}/:date?/:hour?/:seconds?`}
path={`/recording/${camera}/:date?/:hour?/:seconds?`} href={`/recording/${camera}`}
href={`/recording/${camera}`} text={camera}
text={camera} />
/> ))}
);
}
return null;
})}
<Separator /> <Separator />
</Fragment> </Fragment>
) : null ) : null