Skip to content

Commit

Permalink
Add org create request button
Browse files Browse the repository at this point in the history
  • Loading branch information
Sulton88Mehron90 committed Nov 16, 2023
1 parent bac9957 commit df78623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/Components/CareRequestForm/CareRequestForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function CareRequestForm() {
const [formData, setFormData] = useState({
aidType: '',
description: '',
// You can add more fields as needed
// more fields ?
});

const handleChange = (e) => {
Expand All @@ -20,11 +20,11 @@ function CareRequestForm() {

const handleSubmit = (e) => {
e.preventDefault();
// Here you should add the logic to send data to your server
// Here we should add the logic to send data to the server
// For now, we'll just log the formData and navigate to a different page
console.log(formData);

// After submitting, navigate to a different page, e.g., the dashboard or a success page
// After submitting, navigate to a different page, mayby the dashboard or a success page?
navigate('/success');
};

Expand All @@ -37,14 +37,12 @@ function CareRequestForm() {
<option value="">Select Aid Type</option>
<option value="food">Food</option>
<option value="medical">Medical</option>
{/* Add other options as necessary */}
</select>
</div>
<div className="form-group">
<label htmlFor="description">Description:</label>
<textarea name="description" value={formData.description} onChange={handleChange} className="form-control" />
</div>
{/* Add other input fields similarly */}
<button type="submit" className="submit-button">Submit Request</button>
</form>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/Components/CareRequestForm/CareRequestForm.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../index.scss';

.care-request-form-container {
display: flex;
justify-content: center;
Expand Down

0 comments on commit df78623

Please sign in to comment.