|
@@ -1,11 +1,14 @@
|
|
|
-import { useEffect, useState } from 'react';
|
|
|
-import { useSelector, useDispatch } from 'react-redux';
|
|
|
+import { useState } from 'react';
|
|
|
+import { useDispatch } from 'react-redux';
|
|
|
|
|
|
import { uploadPicture } from 'store/user/actions';
|
|
|
+import { CustomModal } from 'components/modal';
|
|
|
|
|
|
import classes from './index.module.scss';
|
|
|
|
|
|
const Main = () => {
|
|
|
+ const [showModal, setShowModal] = useState(false);
|
|
|
+
|
|
|
const [file, setFile] = useState(null);
|
|
|
const dispatch = useDispatch();
|
|
|
console.log('file', file);
|
|
@@ -16,11 +19,27 @@ const Main = () => {
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
- <h1>MAIN PAGE</h1>
|
|
|
+ <h1>MAIN PAGE</h1>
|
|
|
+ {showModal && (
|
|
|
+ <CustomModal
|
|
|
+ closeEvent={() => setShowModal(false)}>
|
|
|
+ <div style={{ padding: 30}}><h2>HELLO</h2></div>
|
|
|
+ </CustomModal>
|
|
|
+ )}
|
|
|
+
|
|
|
+ <input type="file" onChange={(e) => setFile(e.target.files[0])} />
|
|
|
+
|
|
|
+ <button onClick={uploadHandler}>UPLOAD</button>
|
|
|
+ <button onClick={() => setShowModal(true)}>OPEN MODAL</button>
|
|
|
+
|
|
|
+
|
|
|
+ <div className={classes.grid}>
|
|
|
+ <div className={classes.header}>header</div>
|
|
|
+ <div className={classes.sidebar}>sidebar</div>
|
|
|
+ <div className={classes.item}>main</div>
|
|
|
+ <div className={classes.footer}>footer</div>
|
|
|
+ </div>
|
|
|
|
|
|
- <input type="file" onChange={(e) => setFile(e.target.files[0])} />
|
|
|
-
|
|
|
- <button onClick={uploadHandler}>UPLOAD</button>
|
|
|
</div>
|
|
|
)
|
|
|
}
|