diff --git a/web/src/routes/Cameras.jsx b/web/src/routes/Cameras.jsx index 94b7cb7f1b..3bb5647bd1 100644 --- a/web/src/routes/Cameras.jsx +++ b/web/src/routes/Cameras.jsx @@ -29,12 +29,8 @@ function Camera({ name, conf }) { const { payload: snapshotValue, send: sendSnapshots } = useSnapshotsState(name); const href = `/cameras/${name}`; const buttons = useMemo(() => { - const result = [{ name: 'Events', href: `/events?camera=${name}` }]; - if (conf.record.enabled) { - result.push({ name: 'Recordings', href: `/recording/${name}` }); - } - return result; - }, [name, conf.record.enabled]); + return [{ name: 'Events', href: `/events?camera=${name}` }, { name: 'Recordings', href: `/recording/${name}` }]; + }, [name]); const icons = useMemo( () => [ { diff --git a/web/src/routes/__tests__/Cameras.test.jsx b/web/src/routes/__tests__/Cameras.test.jsx index 68d0d0a801..cdb0c400d9 100644 --- a/web/src/routes/__tests__/Cameras.test.jsx +++ b/web/src/routes/__tests__/Cameras.test.jsx @@ -46,7 +46,7 @@ describe('Cameras Route', () => { expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument(); - expect(screen.queryAllByText('Recordings')).toHaveLength(1); + expect(screen.queryAllByText('Recordings')).toHaveLength(2); }); test('buttons toggle detect, clips, and snapshots', async () => {