引入 husky,并全局重新格式化
This commit is contained in:
@@ -6,7 +6,6 @@ import {useStore} from 'zustand/react'
|
||||
import {createProfileStore, ProfileStore} from '@/lib/stores/profile'
|
||||
import {createLayoutStore, LayoutStore} from '@/lib/stores/layout'
|
||||
|
||||
|
||||
export type StoreContextType = {
|
||||
profile: StoreApi<ProfileStore>
|
||||
layout: StoreApi<LayoutStore>
|
||||
@@ -20,7 +19,6 @@ export type ProfileProviderProps = {
|
||||
}
|
||||
|
||||
export default function StoreProvider(props: ProfileProviderProps) {
|
||||
|
||||
const profile = useRef<StoreApi<ProfileStore>>(null)
|
||||
if (!profile.current) {
|
||||
console.log('📦 create profile store')
|
||||
@@ -43,7 +41,6 @@ export default function StoreProvider(props: ProfileProviderProps) {
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export function useProfileStore<T>(selector: (store: ProfileStore) => T) {
|
||||
const ctx = useContext(StoreContext)
|
||||
if (!ctx) {
|
||||
|
||||
Reference in New Issue
Block a user