lucas-wa commited on
Commit
87acbae
·
2 Parent(s): 5f10035 89bf64d

Merge branch 'main' of github.com:workshop-question-generator/perguntai-app

Browse files
Files changed (1) hide show
  1. web/src/App.jsx +15 -3
web/src/App.jsx CHANGED
@@ -18,6 +18,18 @@ function App() {
18
  const [isLoading, setIsLoading] = useState(false);
19
  const [questions, setQuestions] = useState(null);
20
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  const handleSubmit = async (e) => {
22
  e.preventDefault();
23
  setIsLoading(true);
@@ -110,9 +122,9 @@ function App() {
110
  <SelectValue placeholder="Conteúdo" />
111
  </SelectTrigger>
112
  <SelectContent onChange={e => console.log(e)}>
113
- <SelectItem value="fisiologia">Fisiologia</SelectItem>
114
- <SelectItem value="embriologia">Embriologia</SelectItem>
115
- <SelectItem value="citologia">Citologia</SelectItem>
116
  </SelectContent>
117
  </Select>
118
  <button className="h-10 bg-purple-500 rounded px-2.5 py-1 mt-5 hover:brightness-110 transition-all flex items-center justify-center disabled:hover:brightness-75 disabled:brightness-75"
 
18
  const [isLoading, setIsLoading] = useState(false);
19
  const [questions, setQuestions] = useState(null);
20
 
21
+ const subjects = [
22
+ {label:"Fisiologia", value: "fisiologia" },
23
+ {label:"Embriologia", value: "embriologia" },
24
+ {label:"Citologia", value: "citologia" },
25
+ {label:"Genética", value: "genetica" },
26
+ {label:"Botânica", value: "botanica" },
27
+ {label:"Zoologia", value: "zoologia" },
28
+ {label:"Morfologia", value: "morfologia" },
29
+ {label:"Ecologia", value: "ecologia" },
30
+ {label:"Biofísica", value: "biofisica" },
31
+ ]
32
+
33
  const handleSubmit = async (e) => {
34
  e.preventDefault();
35
  setIsLoading(true);
 
122
  <SelectValue placeholder="Conteúdo" />
123
  </SelectTrigger>
124
  <SelectContent onChange={e => console.log(e)}>
125
+ subjects && subjects.map(({ label, value }) => (
126
+ <SelectItem key={value} value={value}>{label}</SelectItem>
127
+ ))
128
  </SelectContent>
129
  </Select>
130
  <button className="h-10 bg-purple-500 rounded px-2.5 py-1 mt-5 hover:brightness-110 transition-all flex items-center justify-center disabled:hover:brightness-75 disabled:brightness-75"