This repository was archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.jsx
More file actions
46 lines (41 loc) · 1.23 KB
/
Main.jsx
File metadata and controls
46 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Lottie from 'lottie-react';
import { connect } from 'react-redux';
import animationData from '../../animations/working.json';
import SimpleButton from '../../components/SimpleButton';
import BoardContainer from '../Board';
import IssueFormContainer, { toggleIssueFormIsOpen } from '../IssueForm';
const Main = ({ isIssueFormOpen, toggleIssueFormOpen }) => (
<div style={{ height: '100vh', width: '100vw' }}>
<Lottie
loop
autoplay
height="100vh"
width="100vw"
animationData={animationData}
style={{
position: 'fixed',
zIndex: -1,
margin: 'auto',
top: 0,
bottom: 0,
left: 0,
right: 0,
width: '100vw',
height: '100vh',
}}
/>
<BoardContainer />
{isIssueFormOpen && <IssueFormContainer />}
<div style={{ position: 'fixed', zIndex: 1, bottom: '36px', right: '36px' }}>
<SimpleButton materialIconName="add" onClick={toggleIssueFormOpen} />
</div>
</div>
);
const mapStateToProps = ({ issueForm: { isOpen } }) => ({
isIssueFormOpen: isOpen,
});
const mapDispatchToProps = {
toggleIssueFormOpen: toggleIssueFormIsOpen,
};
// @ts-ignore
export default connect(mapStateToProps, mapDispatchToProps)(Main);