Skip to content

Commit

Permalink
feat(stores): create GlobalVolumeStore
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Aug 22, 2022
1 parent cea1597 commit a2bf22d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/stores/GlobalVolumeStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import create from 'zustand'

interface GlobalVolumeState {
globalVolume: number
setGlobalVolume: (newGlobalVolume: number) => void
}

export const useGlobalVolumeStore = create<GlobalVolumeState>(set => ({
globalVolume: 1,
setGlobalVolume: (newGlobalVolume: number) =>
set(() => ({ globalVolume: newGlobalVolume }))
}))

0 comments on commit a2bf22d

Please sign in to comment.