fix(auth): align session lifecycle with Keycloak
This commit is contained in:
@@ -26,6 +26,7 @@ import "dayjs/locale/zh-cn";
|
||||
import { api } from "@/lib/api";
|
||||
import { NETWORK_NAME, config } from "@config/config";
|
||||
import { useControllableObjectState } from "@components/olmap/core/useControllableState";
|
||||
import { useSessionRecoveryDraft } from "@/lib/sessionRecoveryDraft";
|
||||
import { FLOW_DISPLAY_UNIT, toM3s } from "@utils/units";
|
||||
import { BurstLocationResult } from "./types";
|
||||
import { getBurstLocationErrorNotice } from "./burstLocationError";
|
||||
@@ -105,6 +106,13 @@ const AnalysisParameters: React.FC<Props> = ({
|
||||
} = parametersState;
|
||||
const [schemeLoading, setSchemeLoading] = useState(false);
|
||||
const [running, setRunning] = useState(false);
|
||||
useSessionRecoveryDraft("burst-location", parametersState, (draft) =>
|
||||
setParametersState({
|
||||
...draft,
|
||||
burstStartTime: draft.burstStartTime ? dayjs(draft.burstStartTime) : null,
|
||||
burstEndTime: draft.burstEndTime ? dayjs(draft.burstEndTime) : null,
|
||||
}),
|
||||
);
|
||||
const isSimulationMode = dataSource === "simulation";
|
||||
|
||||
const applySchemeTimeRange = useCallback((scheme: SchemeItem) => {
|
||||
|
||||
Reference in New Issue
Block a user