diff --git a/client/src/App.js b/client/src/App.js index 48ecf9b176e6d8caac2b3f349125aeee97d449ca..553a038f687f7dae9c630abcb21fbd70f7591a3c 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,13 +1,13 @@ import './styles/App.css'; import React, { useState } from "react"; - import { useParams } from "react-router-dom"; import Connected from './pages/Connected'; import { toast } from "react-toastify"; import { ToastContainer } from "react-toastify" import 'react-toastify/dist/ReactToastify.css'; import { useNavigate, useLocation } from "react-router-dom"; +import { Cookies, useCookies } from 'react-cookie' @@ -17,7 +17,11 @@ function App(props) { const { code } = useParams(); const { search } = useLocation(); let url = new URLSearchParams(search) - + const [cookies, setCookie] = useCookies(['once']) + let d = new Date() + d.setTime(d.getTime() + 60); + setCookie('is', '1', { path: "/", d }); + console.log(cookies); const onSubmit = (e) => { const tagger = { @@ -56,8 +60,6 @@ function App(props) { ) } - - } export default App;