diff --git a/src/components/QuestionSearchResult.js b/src/components/QuestionSearchResult.js
index 201fe03..05f1d8a 100644
--- a/src/components/QuestionSearchResult.js
+++ b/src/components/QuestionSearchResult.js
@@ -52,7 +52,7 @@ export default function QuestionSearchResult({ data, searchTerm }) {
próbáld bővíteni a keresési feltételt!`}
)}
- {results > 0 &&
{`${results} találat.`}
}
+ {results > 0 && searchTerm ? {`${results} találat.`}
: null}
)
}
diff --git a/src/components/dbSelector.js b/src/components/dbSelector.js
index 888d7fb..9dc43d7 100644
--- a/src/components/dbSelector.js
+++ b/src/components/dbSelector.js
@@ -9,7 +9,6 @@ export default function DbSelector({ onDbSelect, closeClick, text, showAll }) {
const [qdbs, setQdbs] = useState(null)
useEffect(() => {
- console.info('Fetching dbs')
fetch(`${constants.apiUrl}getDbs`, {
credentials: 'include',
})
diff --git a/src/components/layout.module.css b/src/components/layout.module.css
index eb33d6f..fc57c16 100644
--- a/src/components/layout.module.css
+++ b/src/components/layout.module.css
@@ -48,6 +48,7 @@
padding: 0px 8px;
margin: 0px 2px;
text-decoration: none;
+ transition: width 0.5s, height 0.5s, ease-in 0.2s;
}
.topBarLinks > *:hover {
@@ -56,7 +57,7 @@
}
.topBarLinks a.active {
- border: 0.5px solid var(--text-color);
+ background-color: var(--hoover-color);
border-radius: 5px;
}
@@ -111,7 +112,7 @@
margin: 5px 2px;
text-decoration: none;
color: var(--bright-color);
- transition: width 0.5s, height 0.5s, ease-in 0.5s;
+ transition: width 0.5s, height 0.5s, ease-in 0.2s;
cursor: pointer;
}
@@ -127,7 +128,7 @@
color: black;
font-weight: bold;
text-shadow: 2px 2px 8px black;
- transition: width 0.5s, height 0.5s, ease-out 0.5s;
+ transition: width 0.5s, height 0.5s, ease-out 0.2s;
}
.userStatus {
diff --git a/src/pages/allQuestions.js b/src/pages/allQuestions.js
index 48cf713..25b7f04 100644
--- a/src/pages/allQuestions.js
+++ b/src/pages/allQuestions.js
@@ -57,7 +57,6 @@ function fetchAllData(dbs) {
function fetchDbs() {
return new Promise((resolve) => {
- console.info('Fetching data')
fetch(`${constants.apiUrl}getDbs`, {
credentials: 'include',
})
@@ -86,9 +85,16 @@ export default function AllQuestions({ router, globalState, setGlobalState }) {
router.replace(`${router.asPath.replace('.html', '')}`, undefined, {
shallow: true,
})
- fetchDbs().then((res) => {
- setDbs(res)
- })
+ if (globalState.qdbs) {
+ setDbs(globalState.qdbs)
+ } else {
+ fetchDbs().then((res) => {
+ setDbs(res)
+ setGlobalState({
+ qdbs: res,
+ })
+ })
+ }
}, [])
useEffect(() => {
diff --git a/src/pages/ranklist.js b/src/pages/ranklist.js
index a08ac5b..4d0778b 100644
--- a/src/pages/ranklist.js
+++ b/src/pages/ranklist.js
@@ -50,7 +50,6 @@ function getSinceDate(keyword) {
async function getListFromServer(since) {
return new Promise((resolve, reject) => {
- console.info('Fetching data')
let query = ''
if (since && since !== 'all') {
query = `?since=${getTimeString(getSinceDate(since))}`