fix(auth): align session lifecycle with Keycloak
This commit is contained in:
@@ -20,6 +20,7 @@ import "dayjs/locale/zh-cn";
|
||||
import { api } from "@/lib/api";
|
||||
import { NETWORK_NAME } from "@config/config";
|
||||
import { useControllableObjectState } from "@components/olmap/core/useControllableState";
|
||||
import { useSessionRecoveryDraft } from "@/lib/sessionRecoveryDraft";
|
||||
import { BurstDetectionResult } from "./types";
|
||||
|
||||
interface Props {
|
||||
@@ -121,6 +122,12 @@ const AnalysisParameters: React.FC<Props> = ({
|
||||
} = parametersState;
|
||||
const [running, setRunning] = useState(false);
|
||||
const [frequencyLoading, setFrequencyLoading] = useState(false);
|
||||
useSessionRecoveryDraft("burst-detection", parametersState, (draft) =>
|
||||
setParametersState({
|
||||
...draft,
|
||||
targetTime: draft.targetTime ? dayjs(draft.targetTime) : null,
|
||||
}),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (samplingIntervalSource !== "metadata") return;
|
||||
|
||||
Reference in New Issue
Block a user