update: add zustand store and basic setup
This commit is contained in:
20
src/store/tool.ts
Normal file
20
src/store/tool.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { create } from 'zustand'
|
||||
|
||||
export interface ToolState {
|
||||
launchOptions: string[]
|
||||
launchIndex: number
|
||||
powerPlan: number
|
||||
init: () => void
|
||||
}
|
||||
|
||||
const useToolStore = create<ToolState>()((/* set */) => ({
|
||||
launchOptions: ["-novid -nojoy -high -freq 120 -tickrate 128", "", ""],
|
||||
launchIndex: 0,
|
||||
powerPlan: 0,
|
||||
init: () => {
|
||||
console.log('init')
|
||||
},
|
||||
// increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
|
||||
}))
|
||||
|
||||
export default useToolStore
|
||||
Reference in New Issue
Block a user