mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 01:05:20 +03:00
Fix lint errors
This commit is contained in:
parent
77a9d44ddf
commit
330fdc6405
@ -118,7 +118,7 @@ export function useDelete() {
|
||||
}
|
||||
|
||||
export function useRetain() {
|
||||
const { dispatch, state } = useContext(Api);
|
||||
const { state } = useContext(Api);
|
||||
|
||||
async function retainEvent(eventId, shouldRetain) {
|
||||
if (!eventId) return null;
|
||||
|
||||
@ -18,18 +18,18 @@ import { FetchStatus, useApiHost, useEvent, useDelete, useRetain } from '../api'
|
||||
|
||||
const ActionButtonGroup = ({ className, isRetained, handleClickRetain, handleClickDelete, close }) => (
|
||||
<div className={`space-y-2 space-x-2 sm:space-y-0 xs:space-x-4 ${className}`}>
|
||||
<Button className="xs:w-auto" color={isRetained ? "red" : "yellow"} onClick={handleClickRetain}>
|
||||
{isRetained ? (
|
||||
<Fragment>
|
||||
<StarRecording className="w-6" />
|
||||
Un-retain event
|
||||
</Fragment>
|
||||
) : (
|
||||
<Fragment>
|
||||
<StarRecording className="w-6" />
|
||||
Retain event
|
||||
</Fragment>
|
||||
)}
|
||||
<Button className="xs:w-auto" color={isRetained ? 'red' : 'yellow'} onClick={handleClickRetain}>
|
||||
{isRetained ? (
|
||||
<Fragment>
|
||||
<StarRecording className="w-6" />
|
||||
Un-retain event
|
||||
</Fragment>
|
||||
) : (
|
||||
<Fragment>
|
||||
<StarRecording className="w-6" />
|
||||
Retain event
|
||||
</Fragment>
|
||||
)}
|
||||
</Button>
|
||||
<Button className="xs:w-auto" color="red" onClick={handleClickDelete}>
|
||||
<Delete className="w-6" /> Delete event
|
||||
@ -100,7 +100,7 @@ export default function Event({ eventId, close, scrollRef }) {
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}, [eventId, setRetainEvent]);
|
||||
}, [eventId, isRetained, setRetainEvent]);
|
||||
|
||||
const handleClickDelete = () => {
|
||||
setShowDialog(true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user