mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-12 19:36:41 +07:00
removed unnecessary action creators
This commit is contained in:
parent
b75c028ce1
commit
de5726929f
12 changed files with 98 additions and 89 deletions
|
@ -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]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue