-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Survey answer fix #90
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @Ryczko on Vercel. @Ryczko first needs to authorize it. |
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.
Thank you for contributing to Employee Pulse, we really appreciate it! However, the introduced changes require corrections.
src/pages/surveys/index.tsx
Outdated
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.
Changes to this file are unnecessary
@@ -28,6 +29,12 @@ function SurveyResultsPage() { | |||
endDate, | |||
} = useSurveyResultsManager(); | |||
|
|||
const [showOnlyWrittenResponses, setShowOnlyWrittenResponses] = useState(false); | |||
|
|||
const filteredAnswersData = showOnlyWrittenResponses |
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.
It is not good approach. In the given solution, filtering will take place with each rerender of the component, which will be not efficient. It's better to create person state for filteredAnswersData
and update it in useEffect
.
After that all logic should be moved to SurveyResultsManager
a086799
to
ec910ca
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
now it works, in the same branch as before :D it solves #78