Formatting

This commit is contained in:
Nick Mowen 2022-03-11 07:16:43 -07:00
parent 1c5fdf9081
commit 83f50a7318

View File

@ -22,11 +22,11 @@ export default function Sidebar() {
<Fragment>
<Separator />
{Object.entries(cameras)
.filter(([cam, conf]) => conf.gui.show)
.sort(([aCam, aConf], [bCam, bConf]) => aConf.gui.order === bConf.gui.order ? 0 : (aConf.gui.order > bConf.gui.order ? 1 : -1))
.map(([camera]) => (
<Destination key={camera} href={`/cameras/${camera}`} text={camera} />
))}
.filter(([_, conf]) => conf.gui.show)
.sort(([_, aConf], [_, bConf]) => aConf.gui.order === bConf.gui.order ? 0 : (aConf.gui.order > bConf.gui.order ? 1 : -1))
.map(([camera]) => (
<Destination key={camera} href={`/cameras/${camera}`} text={camera} />
))}
<Separator />
</Fragment>
) : null
@ -38,21 +38,21 @@ export default function Sidebar() {
<Fragment>
<Separator />
{Object.entries(cameras)
.filter(([cam, conf]) => conf.gui.show)
.sort(([aCam, aConf], [bCam, bConf]) => aConf.gui.order === bConf.gui.order ? 0 : (aConf.gui.order > bConf.gui.order ? 1 : -1))
.map(([camera, conf]) => {
if (conf.record.enabled) {
return (
<Destination
key={camera}
path={`/recording/${camera}/:date?/:hour?/:seconds?`}
href={`/recording/${camera}`}
text={camera}
/>
);
}
return null;
})}
.filter(([_, conf]) => conf.gui.show)
.sort(([_, aConf], [_, bConf]) => aConf.gui.order === bConf.gui.order ? 0 : (aConf.gui.order > bConf.gui.order ? 1 : -1))
.map(([camera, conf]) => {
if (conf.record.enabled) {
return (
<Destination
key={camera}
path={`/recording/${camera}/:date?/:hour?/:seconds?`}
href={`/recording/${camera}`}
text={camera}
/>
);
}
return null;
})}
<Separator />
</Fragment>
) : null