-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate-Answers-in-QA-Page - Added Small Code #939
base: main
Are you sure you want to change the base?
Integrate-Answers-in-QA-Page - Added Small Code #939
Conversation
@@ -1,4 +1,4 @@ | |||
MONGO_DB_URL=<mongoDB_URL> | |||
MONGO_DB_URL=mongodb://localhost:27017/testdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't push .env changes
@@ -132,6 +133,11 @@ const App = () => { | |||
path="/Q&A" | |||
render={() => <Ques theme={theme} />} | |||
/> | |||
<Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a separate route for answers?? each question should have a list of answers right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's more Efficient for Data Handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directing to a new page for answers doesn't make sense, either make it collapsible(like FAQ page) or open a pop-up and show the question and all its answers,
@@ -273,6 +269,9 @@ function Ques(props) { | |||
> | |||
👎 {item.downvote} | |||
</button> | |||
<button> | |||
<Link to={`/getanswers/${item._id}`}>Get Answer</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead to directing to a different page, make it like a pop-up, (check Broadcast
page for reference)
GetAnswer(answerId); | ||
}, []); | ||
|
||
console.log(answer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove console log statement.
//Get Answer | ||
const GetAnswer = (answerId) => { | ||
try { | ||
fetch(`${END_POINT}/answers/${answerId}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add page loader and generic toast message Which should show success message on success and failure message on failure.
I will add all this soon I have exam that why I am inactive it's draft PR |
Closes: #885 (Draft PR)
Proposed changes
Currently the Q&A page only have the question list and form to submit the questions. There should be a way to see all the answers of the particular question sorted by the number of upvotes
Brief description of what is fixed or changed
Added The Answer Page For Specific Question When User Clicks On The Get Answer Button
Types of changes
Checklist
Screenshots
Added Button In Question Card :
Answer Page For Specific Question By User IDs :
Other information
There Answer In Past Days But They Deleted The Answers And Question Also So I Will Work On The Issue #886 And Then Back To This 😁