mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
render: map composing (working)
This commit is contained in:
parent
2eb398ef6b
commit
4747c918e2
9 changed files with 122 additions and 7 deletions
|
@ -9,17 +9,30 @@ import { connect } from 'react-redux';
|
|||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import { hot } from 'react-hot-loader';
|
||||
import { Renderer } from '$components/renderer/Renderer';
|
||||
import { hideRenderer } from '$redux/user/actions';
|
||||
|
||||
const Component = () => (
|
||||
type Props = {
|
||||
renderer_active: Boolean,
|
||||
hideRenderer: Function,
|
||||
}
|
||||
|
||||
const Component = (props: Props) => (
|
||||
<div>
|
||||
<Fills />
|
||||
<UserLocation />
|
||||
<UserPanel />
|
||||
<EditorPanel />
|
||||
{
|
||||
props.renderer_active &&
|
||||
<Renderer onClick={props.hideRenderer} />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
const mapStateToProps = () => ({});
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch);
|
||||
const mapStateToProps = ({ user }) => ({
|
||||
renderer_active: user.renderer_active
|
||||
});
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ hideRenderer }, dispatch);
|
||||
export const App = connect(mapStateToProps, mapDispatchToProps)(hot(module)(Component));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue