``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
30 lines
628 B
TypeScript
30 lines
628 B
TypeScript
import { appInfoActionTypes } from "../actions/appInfo";
|
|
import { AppInfoAction } from "../actions/appInfo/typings";
|
|
import { AppInfoState } from "../stores/typings";
|
|
|
|
const initialState: AppInfoState = {
|
|
error: null,
|
|
};
|
|
function appInfo(
|
|
state: AppInfoState = initialState,
|
|
action: AppInfoAction
|
|
): AppInfoState {
|
|
switch (action.type) {
|
|
case appInfoActionTypes.ERROR_SET:
|
|
return {
|
|
...state,
|
|
error: {
|
|
type: action.payload.appErrorType,
|
|
errorId: action.payload.errorId,
|
|
},
|
|
};
|
|
|
|
default:
|
|
// not implemented
|
|
}
|
|
|
|
return state;
|
|
}
|
|
|
|
export default appInfo;
|