Small change.

This commit is contained in:
Daniel 2022-06-26 21:10:27 +04:30
parent 8240b3e80e
commit f374292feb
4 changed files with 5 additions and 17 deletions

View File

@ -80,7 +80,7 @@ function App() {
useEffect(() => {
const currentURL = new URL(window.location.href);
SetPath(currentURL.pathname);
})
}, [path])
useEffect(() => {
fetchData();

View File

@ -29,13 +29,13 @@ const List = ({ SetPath, data, tags, collections, reFetch, SetLoader, lightMode
setNumberOfResults(data.length);
}, [data]);
let currentPATH = new URL(window.location.href).pathname
let currentPATH = new URL(window.location.href).pathname;
return (
<div className="list">
{numberOfResults > 0 ? (
<p>
{currentPATH === "/" ? null : <Link className="btn return-btn" to="/">Return to main page</Link>} {numberOfResults} {numberOfResults === 1 ? "Link " : "Links "}
{currentPATH === "/" ? null : <Link className="return-btn" to="/">Return to main page</Link>} {numberOfResults} {numberOfResults === 1 ? "Link " : "Links "}
found.
</p>
) : null}

View File

@ -161,8 +161,6 @@
}
.tags a {
padding: 10px;
border-radius: 10px;
text-shadow: none;
margin: 5px;
color: inherit;
@ -246,10 +244,10 @@
}
.return-btn {
border-radius: 10px;
color: inherit;
opacity: 80%;
padding: 5px;
font-size: small;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
margin-right: 5px;
text-shadow: none;
}

View File

@ -27,11 +27,6 @@ body {
background-color: #1f2c38;
}
.tags a {
background: #273949;
box-shadow: 6px 6px 11px #21303e, -6px -6px 11px #2d4254;
}
.send-btn,
.apply-btn {
background-color: #273949;
@ -102,11 +97,6 @@ body {
background-color: lightyellow;
}
.light .tags a {
background: #ffffe0b2;
box-shadow: 6px 6px 11px #d9d9be, -6px -6px 11px #ffffff;
}
.light .btn {
background-color: lightyellow;
color: gray;