mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-12 19:36:41 +07:00
fixed logo components
This commit is contained in:
parent
0f31144567
commit
23c9e42bd5
4 changed files with 29 additions and 19 deletions
|
@ -3,14 +3,20 @@ import { LOGOS } from '$constants/logos';
|
|||
import { Icon } from '$components/panels/Icon';
|
||||
import classnames from 'classnames';
|
||||
import * as MAP_ACTIONS from "$redux/map/actions"
|
||||
import { IMapReducer } from '$redux/map';
|
||||
import { selectMapLogo } from '$redux/map/selectors';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
interface Props {
|
||||
logo: IMapReducer['logo'],
|
||||
mapSetLogo: typeof MAP_ACTIONS.mapSetLogo,
|
||||
}
|
||||
const mapStateToProps = state => ({
|
||||
logo: selectMapLogo(state),
|
||||
});
|
||||
|
||||
export const LogoDialog = ({ logo, mapSetLogo }: Props) => (
|
||||
const mapDispatchToProps = {
|
||||
mapSetLogo: MAP_ACTIONS.mapSetLogo,
|
||||
};
|
||||
|
||||
type Props = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
|
||||
|
||||
const LogoDialogUnconnected = ({ logo, mapSetLogo }: Props) => (
|
||||
<div className="control-dialog top">
|
||||
<div className="helper logo-helper">
|
||||
<div className="helper-back">
|
||||
|
@ -30,3 +36,7 @@ export const LogoDialog = ({ logo, mapSetLogo }: Props) => (
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const LogoDialog = connect(mapStateToProps, mapDispatchToProps)(LogoDialogUnconnected);
|
||||
|
||||
export { LogoDialog };
|
|
@ -3,7 +3,6 @@ import { PROVIDERS, replaceProviderUrl } from '$constants/providers';
|
|||
import { Icon } from '$components/panels/Icon';
|
||||
import classnames from 'classnames';
|
||||
import * as MAP_ACTIONS from "$redux/map/actions";
|
||||
import { IRootState } from "$redux/user";
|
||||
import { selectMapProvider } from '$redux/map/selectors';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue