Skip to content

Commit

Permalink
fix: use getState on client side instead of servers redux store
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Nov 11, 2020
1 parent 948ab79 commit 18d0562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
import { I18nextProvider } from 'react-i18next'
import i18n from './i18n'
import { IMixerProtocol } from '../server/constants/MixerProtocolInterface'
import { ICustomPages } from '../server/reducers/settingsReducer'

declare global {
interface Window {
Expand Down
7 changes: 4 additions & 3 deletions client/utils/SocketClientHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
InumberOfChannels,
} from '../../server/reducers/channelsReducer'
import { VuType } from '../../server/utils/vuServer'
import { state } from '../../server/reducers/store'

export const vuMeters: number[][] = []

Expand Down Expand Up @@ -120,8 +119,10 @@ export const socketClientHandlers = () => {
VuType.Reduction,
(faderIndex: number, channelIndex: number, level: number) => {
if (
state.settings[0].showChanStrip === faderIndex &&
state.settings[0].showChanStripFull === faderIndex
window.storeRedux.getState().settings[0].showChanStrip ===
faderIndex &&
window.storeRedux.getState().settings[0]
.showChanStripFull === faderIndex
) {
window.storeRedux.dispatch(
storeVuReductionLevel(faderIndex, level)
Expand Down

0 comments on commit 18d0562

Please sign in to comment.