[DEV-532] added question input page and page navigation#67
[DEV-532] added question input page and page navigation#67adambelouad wants to merge 7 commits intopreviewfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
31c1bdf to
13bf3b4
Compare
frontend/components/AskQuestion.tsx
Outdated
| <label className='block text-sm font-semibold mb-1'> | ||
| Question Title | ||
| </label> | ||
| <input |
There was a problem hiding this comment.
Swap these html input elements for TextInput evergreen elements
frontend/components/AskQuestion.tsx
Outdated
|
|
||
| {/* Buttons */} | ||
| <div className='flex gap-3 mt-2'> | ||
| <button |
There was a problem hiding this comment.
Use the Evergreen Button element
frontend/components/AskQuestion.tsx
Outdated
| {/* Category */} | ||
| <div> | ||
| <label className='block text-sm font-semibold mb-1'>Category</label> | ||
| <select |
There was a problem hiding this comment.
Use Evergreen SelectMenu
issacli-0821
left a comment
There was a problem hiding this comment.
Left some comments!
frontend/components/AskQuestion.tsx
Outdated
| <option value='Assignments and PSETs'>Assignments and PSETs</option> | ||
| <option value='Exam Prep'>Exam Prep</option> | ||
| <option value='Resource Recommendations'> | ||
| Resource Recommendations |
There was a problem hiding this comment.
Put these options in a list as a constant on the top of the file
issacli-0821
left a comment
There was a problem hiding this comment.
Left a couple more comments
frontend/components/AskQuestion.tsx
Outdated
| {/* Question Title */} | ||
| <div> | ||
| <label className='block text-sm font-semibold mb-1'> | ||
| Question Title |
There was a problem hiding this comment.
Some of these elements still need to be swapped over to Evergreen elements
frontend/components/AskQuestion.tsx
Outdated
| {/* Category */} | ||
| <div> | ||
| <label className='block text-sm font-semibold mb-1'>Category</label> | ||
| <SelectMenu |
There was a problem hiding this comment.
We need to add validation logic here. Right now, users can submit a question without a category being selected
| setForm((prev) => ({ ...prev, category: e.target.value })); | ||
| }; | ||
|
|
||
| const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => { |
There was a problem hiding this comment.
Add a comment here for TODO: API request to submit a question
package.json
Outdated
There was a problem hiding this comment.
The dependencies should be in frontend folder. Also, we're using yarn as our package manager, not npm
References
Proposed Changes