mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix copying logs (#5373)
This commit is contained in:
parent
66881eb89f
commit
74d6ab0555
@ -4,6 +4,7 @@ import { useCallback, useEffect, useState } from 'preact/hooks';
|
||||
import ButtonsTabbed from '../components/ButtonsTabbed';
|
||||
import useSWR from 'swr';
|
||||
import Button from '../components/Button';
|
||||
import copy from 'copy-to-clipboard';
|
||||
|
||||
export default function Logs() {
|
||||
const [logService, setLogService] = useState('frigate');
|
||||
@ -14,10 +15,7 @@ export default function Logs() {
|
||||
const { data: nginxLogs } = useSWR('logs/nginx');
|
||||
|
||||
const handleCopyLogs = useCallback(() => {
|
||||
async function copy() {
|
||||
await window.navigator.clipboard.writeText(logs);
|
||||
}
|
||||
copy();
|
||||
copy(logs);
|
||||
}, [logs]);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user