mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 01:08:41 +08:00
feat: migrate state from v1 to v2
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
import { FETCH_COMMIT_URL, FETCH_TAG_URL } from "../constant";
|
||||
import { FETCH_COMMIT_URL, FETCH_TAG_URL, StoreKey } from "../constant";
|
||||
import { requestUsage } from "../requests";
|
||||
|
||||
export interface UpdateStore {
|
||||
@@ -16,8 +16,6 @@ export interface UpdateStore {
|
||||
updateUsage: (force?: boolean) => Promise<void>;
|
||||
}
|
||||
|
||||
export const UPDATE_KEY = "chat-update";
|
||||
|
||||
function queryMeta(key: string, defaultValue?: string): string {
|
||||
let ret: string;
|
||||
if (document) {
|
||||
@@ -84,7 +82,7 @@ export const useUpdateStore = create<UpdateStore>()(
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: UPDATE_KEY,
|
||||
name: StoreKey.Update,
|
||||
version: 1,
|
||||
},
|
||||
),
|
||||
|
Reference in New Issue
Block a user