From 19db9cf3cf6de12e8786e17d74dae419f3d06851 Mon Sep 17 00:00:00 2001 From: LaoYutang <98928624+LaoYutang@users.noreply.github.com> Date: Fri, 26 May 2023 17:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9restapi=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=9C=A8localstorage=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/request.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stores/request.ts b/src/stores/request.ts index aeca1c7..59639eb 100644 --- a/src/stores/request.ts +++ b/src/stores/request.ts @@ -46,10 +46,8 @@ function getControllerFromLocation (): string | null { } // jotai v2 use initialValue first avoid hydration warning, but we don't want that -const hostsStorageOrigin = localStorage.getItem('externalControllers') ?? - getControllerFromLocation() ?? - '[{ "hostname": "127.0.0.1", "port": 7890, "secret": "" }]' -const hostSelectIdxStorageOrigin = localStorage.getItem('externalControllerIndex') ?? '0' +const hostsStorageOrigin = '[{ "hostname": "127.0.0.1", "port": 9090, "secret": "" }]' +const hostSelectIdxStorageOrigin = '0' export const hostsStorageAtom = atomWithStorage