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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user