mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix(session-recording): stop session logs panel from refetching in a loop
This commit is contained in:
1 parent
75c3542ba0
commit
796db8f0a8
1 file changed
+3
-2
@@ -1,4 +1,4 @@
|
|||||||
import { useState, useEffect, useCallback, useRef } from "react";
|
import { useState, useEffect, useCallback, useMemo, useRef } from "react";
|
||||||
import {
|
import {
|
||||||
useTranslation,
|
useTranslation,
|
||||||
useToast,
|
useToast,
|
||||||
@@ -243,7 +243,8 @@ function LogRow({
|
|||||||
export function SessionLogsPanel() {
|
export function SessionLogsPanel() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const api = createSessionRecordingApi(usePluginApi());
|
const pluginApi = usePluginApi();
|
||||||
|
const api = useMemo(() => createSessionRecordingApi(pluginApi), [pluginApi]);
|
||||||
const canView = usePermission("view");
|
const canView = usePermission("view");
|
||||||
const [logs, setLogs] = useState<SessionLogRecord[]>([]);
|
const [logs, setLogs] = useState<SessionLogRecord[]>([]);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|||||||
Reference in new issue
Block a user