You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/js/reducers/LogReducer.js

46 lines
736 B

/* @flow */
'use strict';
type LogEntry = {
time: number;
type: string;
messgage: string;
}
export type State = {
opened: boolean;
entries: Array<LogEntry>;
}
export const initialState: State = {
opened: false,
entries: [],
};
export default (state: State = initialState, action: any): State => {
switch (action.type) {
case 'log__open':
return {
...state,
opened: true
}
case 'log__close':
return {
...state,
opened: false
}
case 'log__add':
return {
...state,
}
default:
return state;
}
}