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

Survey answer fix #90

Merged
merged 2 commits into from
Apr 1, 2023
Merged

Survey answer fix #90

merged 2 commits into from
Apr 1, 2023

Conversation

Chrilleweb
Copy link
Contributor

now it works, in the same branch as before :D it solves #78

@vercel
Copy link

vercel bot commented Mar 19, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @Ryczko on Vercel.

@Ryczko first needs to authorize it.

@Chrilleweb Chrilleweb temporarily deployed to preview March 19, 2023 20:41 — with GitHub Actions Inactive
Copy link
Owner

@Ryczko Ryczko left a 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.

Copy link
Owner

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

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

@Ryczko Ryczko force-pushed the survey-answer-fix branch from a086799 to ec910ca Compare April 1, 2023 09:04
@Ryczko Ryczko temporarily deployed to preview April 1, 2023 09:04 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Apr 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
employee-pulse ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2023 9:06am

@Ryczko Ryczko merged commit 2b66a64 into Ryczko:dev Apr 1, 2023
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.

2 participants