mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 01:24:02 +08:00
23 lines
385 B
JavaScript
23 lines
385 B
JavaScript
import {SHOW_TOOLTIP, HIDE_TOOLTIP} from './constants';
|
|
|
|
const initialState = {
|
|
tooltip: false
|
|
};
|
|
|
|
export default function featured (state = initialState, action) {
|
|
switch (action.type) {
|
|
case SHOW_TOOLTIP:
|
|
return {
|
|
...state,
|
|
tooltip: true
|
|
};
|
|
case HIDE_TOOLTIP:
|
|
return {
|
|
...state,
|
|
tooltip: false
|
|
};
|
|
default :
|
|
return state;
|
|
}
|
|
}
|