mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
moved components to TypeScript
This commit is contained in:
parent
85b8860862
commit
0a01c91271
54 changed files with 2771 additions and 5134 deletions
|
@ -1,62 +0,0 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
|
||||
import { EditorPanel } from '$components/panels/EditorPanel';
|
||||
import { Fills } from '$components/Fills';
|
||||
import { UserPanel } from '$components/panels/UserPanel';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import { hot } from 'react-hot-loader';
|
||||
import { Renderer } from '$components/renderer/Renderer';
|
||||
import { hideRenderer, setDialogActive } from '$redux/user/actions';
|
||||
import { Cursor } from '$components/Cursor';
|
||||
import { LeftDialog } from '$containers/LeftDialog';
|
||||
import { TopLeftPanel } from '$components/panels/TopLeftPanel';
|
||||
import { TopRightPanel } from '$components/panels/TopRightPanel';
|
||||
import { LogoPreview } from '$components/logo/LogoPreview';
|
||||
|
||||
type Props = {
|
||||
renderer_active: Boolean,
|
||||
hideRenderer: Function,
|
||||
mode: String,
|
||||
dialog: String,
|
||||
dialog_active: Boolean,
|
||||
sticker: String,
|
||||
set: String,
|
||||
}
|
||||
|
||||
const Component = (props: Props) => (
|
||||
<div>
|
||||
<Fills />
|
||||
<UserPanel />
|
||||
<EditorPanel />
|
||||
|
||||
<TopLeftPanel />
|
||||
<TopRightPanel />
|
||||
<LogoPreview />
|
||||
|
||||
<Cursor mode={props.mode} sticker={props.sticker} set={props.set} />
|
||||
<LeftDialog dialog={props.dialog} dialog_active={props.dialog_active} setDialogActive={props.setDialogActive} />
|
||||
|
||||
{ props.renderer_active &&
|
||||
<Renderer onClick={props.hideRenderer} />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
const mapStateToProps = ({
|
||||
user: {
|
||||
mode, dialog, dialog_active, renderer, activeSticker: { sticker = null, set = null }
|
||||
}
|
||||
}) => ({
|
||||
renderer_active: renderer.renderer_active,
|
||||
mode,
|
||||
dialog,
|
||||
dialog_active,
|
||||
sticker,
|
||||
set,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ hideRenderer, setDialogActive }, dispatch);
|
||||
export const App = connect(mapStateToProps, mapDispatchToProps)(hot(module)(Component));
|
Loading…
Add table
Add a link
Reference in a new issue