mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
All questions / Subject browser page improve #4
This commit is contained in:
parent
38c6f67963
commit
55e3788b29
6 changed files with 69 additions and 14 deletions
|
@ -5,9 +5,10 @@ import LoadingIndicator from '../components/LoadingIndicator.js'
|
|||
import Subject from '../components/Subject.js'
|
||||
import SubjectSelector from '../components/SubjectSelector.js'
|
||||
|
||||
import styles from './subjectBrowser.module.css'
|
||||
import constants from '../constants.json'
|
||||
|
||||
export default function AllQuestions (props) {
|
||||
export default function SubjectBrowser (props) {
|
||||
const [data, setData] = useState(null)
|
||||
const [activeSubjName, setActiveSubjName] = useState('')
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
@ -30,14 +31,22 @@ export default function AllQuestions (props) {
|
|||
|
||||
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>
|
||||
<SubjectSelector
|
||||
data={data}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue