Updates to Gab Deck
• Updates: - to Gab Deck
This commit is contained in:
20
app/javascript/gabsocial/reducers/deck.js
Normal file
20
app/javascript/gabsocial/reducers/deck.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
DECK_CONNECT,
|
||||
DECK_DISCONNECT,
|
||||
} from '../actions/deck'
|
||||
import { Map as ImmutableMap } from 'immutable'
|
||||
|
||||
const initialState = ImmutableMap({
|
||||
connected: false,
|
||||
})
|
||||
|
||||
export default function deck(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case DECK_CONNECT:
|
||||
return state.set('connected', true)
|
||||
case DECK_DISCONNECT:
|
||||
return state.set('connected', false)
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user