From 89358c97817838104c0b6e18f7538113a414d7d9 Mon Sep 17 00:00:00 2001 From: Francisco Pessano Date: Fri, 10 Sep 2021 12:47:53 -0300 Subject: [PATCH] Modularizated even more the application --- src/App.js | 8 +++++- src/components/AddList.jsx | 11 -------- src/components/AddTask.jsx | 45 +++----------------------------- src/components/cacheFunctions.js | 39 +++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 54 deletions(-) delete mode 100644 src/components/AddList.jsx create mode 100644 src/components/cacheFunctions.js diff --git a/src/App.js b/src/App.js index df98f4d..246efa0 100644 --- a/src/App.js +++ b/src/App.js @@ -4,6 +4,7 @@ import Header from './components/Header' import TaskList from "./components/TaskList"; import AddTask from "./components/AddTask"; import Footer from "./components/Footer"; +import { checkCache } from "./components/cacheFunctions"; function App() { @@ -23,7 +24,10 @@ function App() { const [formEditInput, setFormEditInput] = useState('') - + window.onload = () => { + checkCache() + } + return ( <>
@@ -60,6 +64,8 @@ function App() {