diff --git a/src/components/QuestionSearchResult.js b/src/components/QuestionSearchResult.js index b3b47ad..4611cdd 100644 --- a/src/components/QuestionSearchResult.js +++ b/src/components/QuestionSearchResult.js @@ -6,7 +6,7 @@ import Sleep from '../components/sleep' import constants from '../constants.json' class QuestionSearchResult extends PureComponent { - render () { + render() { const { data, searchTerm } = this.props let subjs = [] @@ -19,12 +19,15 @@ class QuestionSearchResult extends PureComponent { if (searchTerm) { subjs = data.reduce((acc, subj) => { const resultQuestions = subj.Questions.reduce((qacc, question) => { - const keys = [ 'Q', 'A', 'data' ] + const keys = ['Q', 'A', 'data'] keys.some((key) => { if (typeof question[key] !== 'string') { return false } - if (question[key] && question[key].toLowerCase().includes(searchTerm.toLowerCase())) { + if ( + question[key] && + question[key].toLowerCase().includes(searchTerm.toLowerCase()) + ) { qacc.push(question) return true } @@ -34,7 +37,7 @@ class QuestionSearchResult extends PureComponent { if (resultQuestions.length > 0) { acc.push({ Name: subj.Name, - Questions: resultQuestions + Questions: resultQuestions, }) } return acc @@ -48,8 +51,17 @@ class QuestionSearchResult extends PureComponent { return (
- {searchTerm ? '' : 'Kezdj el írni kereséshez!'} {results} {searchTerm ? 'találat' : 'kérdés' } {searchTerm ? subjs.length : data.length} tárgy + {searchTerm ? '' : 'Kezdj el írni kereséshez!'} {results}{' '} + {searchTerm ? 'találat' : 'kérdés'}{' '} + {searchTerm ? subjs.length : data.length} tárgy
+ {results === 0 && ( +
+ { + 'Pontos egyezést keres a kereső, próbálj kisebb részletre keresni' + } +
+ )}
) @@ -59,14 +71,10 @@ class QuestionSearchResult extends PureComponent { return renderCount() } else { return ( -
+
+
{renderCount()}
- {renderCount()} -
-
- +
) diff --git a/src/pages/addQuestion.js b/src/pages/addQuestion.js index 5045127..18f9b40 100644 --- a/src/pages/addQuestion.js +++ b/src/pages/addQuestion.js @@ -306,7 +306,7 @@ export default function AddQuestion() { return (
- Qmining - Kérdés beküldés + Qmining - Kérdés beküldés | Frylabs.net {subjects ? ( <> diff --git a/src/pages/allQuestions.js b/src/pages/allQuestions.js index 97eb50b..61e9bd6 100644 --- a/src/pages/allQuestions.js +++ b/src/pages/allQuestions.js @@ -27,12 +27,13 @@ export default function AllQuestions({ router, getData }) { return (
- Qmining - Kérdés keresés + Qmining - Kérdés keresés | Frylabs.net {data ? ( <>
- Qmining - Contribute / Todos + Qmining - Todos | Frylabs.net
Egy kártyára kattintva szavazhatsz. Minél több szavazat érkezik egy @@ -72,7 +72,10 @@ export default function contribute() { (ha van hozzá)
-
Itt írhatsz todo-ra ötleteket
+
+ Itt írhatsz új todo-ra ötleteket, vagy jelezhetsz hogy egyikben + segítenél +
{renderNewTaskArea()}
diff --git a/src/pages/feedback.js b/src/pages/feedback.js index 11e4bfd..8271301 100644 --- a/src/pages/feedback.js +++ b/src/pages/feedback.js @@ -32,6 +32,7 @@ export default function Feedback(props) {
{params.text}