Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TejasNasre
Copy link
Contributor

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

  • Integrating Front End Answer For Specific Question. (Non -Breaking Changes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • My changes does not break the current system and it passes all the current test cases.

Screenshots

Added Button In Question Card :
Answer Added

Answer Page For Specific Question By User IDs :
answerpage

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 😁

@@ -1,4 +1,4 @@
MONGO_DB_URL=<mongoDB_URL>
MONGO_DB_URL=mongodb://localhost:27017/testdb
Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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>
Copy link
Member

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);
Copy link
Member

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}`, {
Copy link
Member

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.

@TejasNasre
Copy link
Contributor Author

I will add all this soon I have exam that why I am inactive it's draft PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Frontend] Integrate Answers in Q&A Page
2 participants