All questions / Subject browser page improve #4

This commit is contained in:
MrFry 2020-03-23 15:38:28 +01:00
parent 38c6f67963
commit 55e3788b29
6 changed files with 69 additions and 14 deletions

View file

@ -4,6 +4,7 @@ import fetch from 'unfetch'
import LoadingIndicator from '../components/LoadingIndicator.js'
import QuestionSearchResult from '../components/QuestionSearchResult.js'
import styles from './allQuestions.module.css'
import constants from '../constants.json'
export default function AllQuestions (props) {
@ -23,14 +24,22 @@ export default function AllQuestions (props) {
if (data) {
return (
<div>
<div>
<div className={styles.searchContainer}>
<input
placeholder='Keresés...'
className='searchBar'
className={styles.searchBar}
type='text'
value={searchTerm}
onChange={(e) => { setSearchTerm(e.target.value) }}
/>
<button
onClick={() => {
setSearchTerm('')
}}
className={styles.clearButton}
>
X
</button>
</div>
<hr />
<div>