mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 06:12:43 +08:00
23 lines
408 B
JavaScript
23 lines
408 B
JavaScript
import {VIEWING_OPTIONS_OPEN, VIEWING_OPTIONS_CLOSE} from './constants';
|
|
|
|
const initialState = {
|
|
open: false
|
|
};
|
|
|
|
export default function offTopic (state = initialState, action) {
|
|
switch (action.type) {
|
|
case VIEWING_OPTIONS_OPEN:
|
|
return {
|
|
...state,
|
|
open: true
|
|
};
|
|
case VIEWING_OPTIONS_CLOSE:
|
|
return {
|
|
...state,
|
|
open: false
|
|
};
|
|
default :
|
|
return state;
|
|
}
|
|
}
|