diff --git a/src/App.js b/src/App.js
index 3734df8..3592b3e 100644
--- a/src/App.js
+++ b/src/App.js
@@ -24,7 +24,6 @@ function App() {
[filterCheckbox, setFilterCheckbox] = useState([true, true, true]),
[sortBy, setSortBy] = useState(1),
[loader, setLoader] = useState(false),
- [path, setPath] = useState("/"),
[lightMode, setLightMode] = useState(
localStorage.getItem("light-mode") === "true"
),
@@ -58,10 +57,6 @@ function App() {
setToggle(!toggle);
}
- function SetPath(pathname) {
- setPath(pathname);
- }
-
const filteredData = filter(data, searchQuery, filterCheckbox);
async function fetchData() {
@@ -78,11 +73,6 @@ function App() {
// eslint-disable-next-line
}, [sortBy, filterCheckbox]);
- useEffect(() => {
- const currentURL = new URL(window.location.href);
- SetPath(currentURL.pathname);
- }, [path]);
-
useEffect(() => {
fetchData();
// eslint-disable-next-line
@@ -123,7 +113,7 @@ function App() {
@@ -185,7 +175,6 @@ function App() {
element={
SetPath()}
lightMode={lightMode}
SetLoader={SetLoader}
data={filteredData}
@@ -201,7 +190,6 @@ function App() {
path="tags/:tagId"
element={
SetPath()}
lightMode={lightMode}
SetLoader={SetLoader}
data={filteredData}
@@ -216,7 +204,6 @@ function App() {
path="collections/:collectionId"
element={
SetPath()}
lightMode={lightMode}
SetLoader={SetLoader}
data={filteredData}
diff --git a/src/componets/List.js b/src/componets/List.js
index dcc52dd..0ae5ce8 100644
--- a/src/componets/List.js
+++ b/src/componets/List.js
@@ -10,16 +10,11 @@ import {
} from 'react-awesome-button';
import 'react-awesome-button/dist/themes/theme-blue.css';
-const List = ({ SetPath, data, tags, collections, reFetch, SetLoader, lightMode }) => {
+const List = ({ data, tags, collections, reFetch, SetLoader, lightMode }) => {
const [editBox, setEditBox] = useState(false),
[editIndex, setEditIndex] = useState(0),
[numberOfResults, setNumberOfResults] = useState(0);
- useEffect(() => {
- const currentURL = new URL(window.location.href);
- SetPath(currentURL.pathname);
- })
-
function edit(index) {
setEditBox(true);
setEditIndex(index);
diff --git a/src/routes/Collections.js b/src/routes/Collections.js
index 65900fc..a08f196 100644
--- a/src/routes/Collections.js
+++ b/src/routes/Collections.js
@@ -1,7 +1,7 @@
import { useParams } from "react-router-dom";
import List from "../componets/List";
-const Collections = ({ SetPath, data, tags, collections, SetLoader, lightMode, reFetch }) => {
+const Collections = ({ data, tags, collections, SetLoader, lightMode, reFetch }) => {
const { collectionId } = useParams();
const dataWithMatchingTag = data.filter((e) => {
return e.collection.includes(collectionId);
@@ -10,7 +10,6 @@ const Collections = ({ SetPath, data, tags, collections, SetLoader, lightMode, r
return (
SetPath()}
lightMode={lightMode}
data={dataWithMatchingTag}
tags={tags}
diff --git a/src/routes/Tags.js b/src/routes/Tags.js
index 35e793e..1d2abb7 100644
--- a/src/routes/Tags.js
+++ b/src/routes/Tags.js
@@ -1,7 +1,7 @@
import { useParams } from "react-router-dom";
import List from "../componets/List";
-const Tags = ({ SetPath, data, tags, collections, SetLoader, lightMode, reFetch }) => {
+const Tags = ({ data, tags, collections, SetLoader, lightMode, reFetch }) => {
const { tagId } = useParams();
const dataWithMatchingTag = data.filter((e) => {
return e.tag.includes(tagId);
@@ -10,7 +10,6 @@ const Tags = ({ SetPath, data, tags, collections, SetLoader, lightMode, reFetch
return (
SetPath()}
lightMode={lightMode}
data={dataWithMatchingTag}
tags={tags}
diff --git a/src/styles/App.css b/src/styles/App.css
index 70e6342..9ddc089 100644
--- a/src/styles/App.css
+++ b/src/styles/App.css
@@ -2,7 +2,6 @@
.search {
width: 35%;
min-width: 300px;
- font-size: 1rem;
}
}
@@ -15,8 +14,6 @@
@media (width <= 400px) {
.search {
width: 120px;
- font-size: 0.6rem;
- font-weight: 600;
}
}
@@ -47,6 +44,7 @@
padding: 10px;
font-family: "Font Awesome 5 Free";
padding-left: 10px;
+ font-size: 1rem;
border: none;
border-radius: 0;
-webkit-appearance: none;
diff --git a/src/styles/index.css b/src/styles/index.css
index 5b032da..96a9937 100644
--- a/src/styles/index.css
+++ b/src/styles/index.css
@@ -39,12 +39,12 @@ body {
--button-raise-level: 3px;
--button-hover-pressure: 0;
--transform-speed: 0.025s;
- --button-primary-color: #273949;
+ --button-primary-color: rgba(39, 57, 73, 0.9);
--button-primary-color-dark: #c6e4ff;
--button-primary-color-light: #c6e4ff;
--button-primary-color-hover: #0d4a7f;
--button-primary-color-active: #0f5ca0;
- --button-primary-border: none;
+ --button-primary-border: 2px solid #e7f4ff;
z-index: 0;
}
@@ -111,11 +111,11 @@ body {
--button-raise-level: 3px;
--button-hover-pressure: 0;
--transform-speed: 0.025s;
- --button-primary-color: #e0e0e0;
+ --button-primary-color: rgba(224, 224, 224, 0.9);
--button-primary-color-dark: #354c7d;
--button-primary-color-light: #354c7d;
--button-primary-color-hover: #e1eaf1;
--button-primary-color-active: #e2e2e2;
- --button-primary-border: none;
+ --button-primary-border: 2px solid #1e88e5;
z-index: 0;
}