diff --git a/package-lock.json b/package-lock.json
index f13c2be..39e5d7b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,8 +13,13 @@
"@testing-library/user-event": "^12.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
+ "react-icons": "^4.10.1",
"react-scripts": "^5.0.1",
- "styled-components": "^6.0.0-rc.3",
+<<<<<<< HEAD
+ "styled-components": "^6.1.2",
+=======
+ "tailwindcss": "^3.3.2",
+>>>>>>> c690ed76214281c74d952da43b39bb0d96bc2a3d
"web-vitals": "^0.2.4"
}
},
@@ -46,78 +51,6 @@
"node": ">=6.0.0"
}
},
- "node_modules/@babel/cli": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.22.5.tgz",
- "integrity": "sha512-N5d7MjzwsQ2wppwjhrsicVDhJSqF9labEP/swYiHhio4Ca2XjEehpgPmerjnLQl7BPE59BLud0PTWGYwqFl/cQ==",
- "dependencies": {
- "@jridgewell/trace-mapping": "^0.3.17",
- "commander": "^4.0.1",
- "convert-source-map": "^1.1.0",
- "fs-readdir-recursive": "^1.1.0",
- "glob": "^7.2.0",
- "make-dir": "^2.1.0",
- "slash": "^2.0.0"
- },
- "bin": {
- "babel": "bin/babel.js",
- "babel-external-helpers": "bin/babel-external-helpers.js"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "optionalDependencies": {
- "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3",
- "chokidar": "^3.4.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/cli/node_modules/commander": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
- "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/@babel/cli/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/@babel/cli/node_modules/pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/@babel/cli/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/@babel/cli/node_modules/slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/@babel/code-frame": {
"version": "7.21.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
@@ -608,20 +541,6 @@
"@babel/core": "^7.13.0"
}
},
- "node_modules/@babel/plugin-external-helpers": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-external-helpers/-/plugin-external-helpers-7.22.5.tgz",
- "integrity": "sha512-ngnNEWxmykPk82mH4ajZT0qTztr3Je6hrMuKAslZVM8G1YZTENJSYwrIGtt6KOtznug3exmAtF4so/nPqJuA4A==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.22.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
"node_modules/@babel/plugin-proposal-async-generator-functions": {
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz",
@@ -2236,6 +2155,19 @@
"postcss-selector-parser": "^6.0.10"
}
},
+ "node_modules/@emotion/is-prop-valid": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz",
+ "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==",
+ "dependencies": {
+ "@emotion/memoize": "^0.8.1"
+ }
+ },
+ "node_modules/@emotion/memoize": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",
+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="
+ },
"node_modules/@emotion/unitless": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",
@@ -3108,12 +3040,6 @@
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
"integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A=="
},
- "node_modules/@nicolo-ribaudo/chokidar-2": {
- "version": "2.1.8-no-fsevents.3",
- "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz",
- "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==",
- "optional": true
- },
"node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
"version": "5.1.1-v1",
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
@@ -4397,6 +4323,11 @@
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
"integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="
},
+ "node_modules/@types/stylis": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz",
+ "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw=="
+ },
"node_modules/@types/testing-library__jest-dom": {
"version": "5.14.5",
"resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz",
@@ -6584,6 +6515,11 @@
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
},
+ "node_modules/csstype": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
+ },
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
@@ -8493,11 +8429,6 @@
"resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
"integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q=="
},
- "node_modules/fs-readdir-recursive": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
- "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA=="
- },
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -12288,9 +12219,9 @@
}
},
"node_modules/nanoid": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
- "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
+ "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
@@ -12938,9 +12869,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.23",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
- "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
+ "version": "8.4.32",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz",
+ "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",
"funding": [
{
"type": "opencollective",
@@ -12956,7 +12887,7 @@
}
],
"dependencies": {
- "nanoid": "^3.3.6",
+ "nanoid": "^3.3.7",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
@@ -14506,6 +14437,14 @@
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz",
"integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg=="
},
+ "node_modules/react-icons": {
+ "version": "4.10.1",
+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz",
+ "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==",
+ "peerDependencies": {
+ "react": "*"
+ }
+ },
"node_modules/react-is": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
@@ -15722,25 +15661,18 @@
}
},
"node_modules/styled-components": {
- "version": "6.0.0-rc.3",
- "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.0.0-rc.3.tgz",
- "integrity": "sha512-5FbCTxynopck99GRwM5Ey0+VRp8pkQq69TwGOJJeYtR7gPvwGjNx8yBPLN7/dfxwwvn9ymOZYB19eQkv2k70wQ==",
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.2.tgz",
+ "integrity": "sha512-LJjirciivbOKNuKKjheXMeNOlFspur4s2/AYW2hPyrL4RhwEFiowF9axgjeMVxX7siEoLJAitKrzpuNApJ5R/Q==",
"dependencies": {
- "@babel/cli": "^7.21.0",
- "@babel/core": "^7.21.0",
- "@babel/helper-module-imports": "^7.18.6",
- "@babel/plugin-external-helpers": "^7.18.6",
- "@babel/plugin-proposal-class-properties": "^7.18.6",
- "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
- "@babel/preset-env": "^7.20.2",
- "@babel/preset-react": "^7.18.6",
- "@babel/preset-typescript": "^7.21.0",
- "@babel/traverse": "^7.21.2",
+ "@emotion/is-prop-valid": "^1.2.1",
"@emotion/unitless": "^0.8.0",
+ "@types/stylis": "^4.0.2",
"css-to-react-native": "^3.2.0",
- "postcss": "^8.4.23",
+ "csstype": "^3.1.2",
+ "postcss": "^8.4.31",
"shallowequal": "^1.1.0",
- "stylis": "^4.2.0",
+ "stylis": "^4.3.0",
"tslib": "^2.5.0"
},
"engines": {
@@ -15751,14 +15683,8 @@
"url": "https://opencollective.com/styled-components"
},
"peerDependencies": {
- "babel-plugin-styled-components": ">= 2",
"react": ">= 16.8.0",
"react-dom": ">= 16.8.0"
- },
- "peerDependenciesMeta": {
- "babel-plugin-styled-components": {
- "optional": true
- }
}
},
"node_modules/stylehacks": {
@@ -15777,9 +15703,9 @@
}
},
"node_modules/stylis": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",
- "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz",
+ "integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ=="
},
"node_modules/sucrase": {
"version": "3.32.0",
diff --git a/package.json b/package.json
index 9d8ee7b..ca9d1ce 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,13 @@
"@testing-library/user-event": "^12.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
+ "react-icons": "^4.10.1",
"react-scripts": "^5.0.1",
- "styled-components": "^6.0.0-rc.3",
+<<<<<<< HEAD
+ "styled-components": "^6.1.2",
+=======
+ "tailwindcss": "^3.3.2",
+>>>>>>> c690ed76214281c74d952da43b39bb0d96bc2a3d
"web-vitals": "^0.2.4"
},
"scripts": {
diff --git a/public/index.html b/public/index.html
index aa069f2..443a0fb 100644
--- a/public/index.html
+++ b/public/index.html
@@ -5,6 +5,7 @@
+
+=======
+import React, { useEffect, useState } from 'react';
+
+import Tasks from './components/Tasks/Tasks';
+import NewTask from './components/NewTask/NewTask';
+
+function App() {
+ const [isLoading, setIsLoading] = useState(false);
+ const [error, setError] = useState(null);
+ const [tasks, setTasks] = useState([]);
+
+ const fetchTasks = async () => {
+ setIsLoading(true);
+ setError(null);
+ try {
+ const response = await fetch(
+ 'https://test-owen-f2913-default-rtdb.firebaseio.com//tasks.json'
+ );
+
+ if (!response.ok) {
+ throw new Error('Request failed!');
+ }
+
+ const data = await response.json();
+
+ const loadedTasks = [];
+
+ for (const taskKey in data) {
+ loadedTasks.push({ id: taskKey, text: data[taskKey].text });
+ }
+
+ setTasks(loadedTasks);
+ } catch (err) {
+ setError(err.message || 'Something went wrong!');
+ }
+ setIsLoading(false);
+ };
+
+ useEffect(() => {
+ fetchTasks();
+ }, []);
+
+ const taskAddHandler = (task) => {
+ setTasks((prevTasks) => prevTasks.concat(task));
+ };
+
+ return (
+ {error}