修改restapi地址,不再在localstorage获取

This commit is contained in:
LaoYutang 2023-05-26 17:21:34 +08:00 committed by GitHub
parent 8616783b97
commit 19db9cf3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<Array<{
hostname: string