Add fixes for deprecation warnings (#49)

This commit is contained in:
Mark Anthony Llego 2023-03-09 07:15:03 +08:00 committed by GitHub
parent 8fcf0764e5
commit 32bb534c81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -18,7 +18,7 @@
"rehype-katex": "^6.0.2",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"zustand": "^4.3.5"
"zustand": "^4.3.6"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",

View file

@ -1,4 +1,4 @@
import create, { SetState, GetState } from 'zustand';
import { StoreApi, create } from 'zustand';
import { persist } from 'zustand/middleware';
import { ChatSlice, createChatSlice } from './chat-slice';
import { InputSlice, createInputSlice } from './input-slice';
@ -8,8 +8,8 @@ import { ConfigSlice, createConfigSlice } from './config-slice';
export type StoreState = ChatSlice & InputSlice & AuthSlice & ConfigSlice;
export type StoreSlice<T> = (
set: SetState<StoreState>,
get: GetState<StoreState>
set: StoreApi<StoreState>['setState'],
get: StoreApi<StoreState>['getState']
) => T;
const useStore = create<StoreState>()(

View file

@ -2101,10 +2101,10 @@ yaml@^1.10.0, yaml@^1.10.2:
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
zustand@^4.3.5:
version "4.3.5"
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.5.tgz#011d2997534f8a187ea7b1d75db56df31f58453d"
integrity sha512-2iPUzfwx+g3f0PagOMz2vDO9mZzEp2puFpNe7vrAymVPOEIEUjCPkC4/zy84eAscxIWmTU4j9g6upXYkJdzEFQ==
zustand@^4.3.6:
version "4.3.6"
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.6.tgz#ce7804eb75361af0461a2d0536b65461ec5de86f"
integrity sha512-6J5zDxjxLE+yukC2XZWf/IyWVKnXT9b9HUv09VJ/bwGCpKNcaTqp7Ws28Xr8jnbvnZcdRaidztAPsXFBIqufiw==
dependencies:
use-sync-external-store "1.2.0"