bounswe / bounswe2022group4

6 stars 3 forks source link

Frontend: Report Post Component #509

Closed umutdenizsenerr closed 1 year ago

umutdenizsenerr commented 1 year ago

Description:

I need to create a new component that includes a modal for users to submit a report when they click the "Report Post" button in our post component. The modal should allow users to enter a description of the issue with the post and any relevant details.

Steps:

1) Create a new component for the modal, and import the Modal component from the library. 2) Add the Modal component to the new component, and use the isOpen prop to control when the modal is displayed. 3) Inside the Modal component, add a form with a text field for the user to enter a description of the issue with the post and any relevant details. 4) Bind the form to the component's state using useState and useEffect, and use the onSubmit event to handle the form submission. 5) Pass a callback function to the post component that opens the modal when the "Report Post" button is clicked, and pass the necessary props down to the modal component.

Reviewer: @BeratDamar Deadline: 21.12.2022 23.59

umutdenizsenerr commented 1 year ago

Since PR is merged, i am closing the issue.