removed unnecessary action creators

This commit is contained in:
Fedor Katurov 2019-12-30 21:16:04 +07:00
parent b75c028ce1
commit de5726929f
12 changed files with 98 additions and 89 deletions

View file

@ -2,14 +2,15 @@ import * as React from 'react';
import { LOGOS } from '$constants/logos';
import { Icon } from '$components/panels/Icon';
import classnames from 'classnames';
import { setLogo as setLogoAction } from "$redux/user/actions";
import { IRootState } from "$redux/user";
import * as MAP_ACTIONS from "$redux/map/actions"
import { IMapReducer } from '$redux/map';
interface Props extends IRootState {
setLogo: typeof setLogoAction,
interface Props {
logo: IMapReducer['logo'],
mapSetLogo: typeof MAP_ACTIONS.mapSetLogo,
}
export const LogoDialog = ({ logo, setLogo }: Props) => (
export const LogoDialog = ({ logo, mapSetLogo }: Props) => (
<div className="control-dialog top">
<div className="helper logo-helper">
<div className="helper-back">
@ -19,7 +20,7 @@ export const LogoDialog = ({ logo, setLogo }: Props) => (
Object.keys(LOGOS).map(item => (
<div
className={classnames('helper-menu-item', { active: (item === logo) })}
onMouseDown={() => setLogo(item)}
onMouseDown={() => mapSetLogo(item)}
key={item}
>
{LOGOS[item][0]}