-
Notifications
You must be signed in to change notification settings - Fork 913
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
fix: survey overview is throwing a server-side error #2638
fix: survey overview is throwing a server-side error #2638
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Thank you for following the naming conventions for pull request titles! 🙏 |
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.
@gupta-piyush19 thanks for the PR :-) quick question/suggestion:
@@ -90,6 +90,14 @@ export const MainNavigation = ({ | |||
localStorage.setItem("isMainNavCollapsed", isCollapsed ? "false" : "true"); | |||
}; | |||
|
|||
useEffect(() => { | |||
if (typeof window !== "undefined") { |
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.
Since a useEffect is always running in client / browser, do we need this check here or can we also simplify this by removing the window check?
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.
yeah, makes sense 👍
…183-survey-overview-is-throwing-a-server-side-error
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.
@gupta-piyush19 thanks for making the changes; looks great! :-)
What does this PR do?
mainNavigation.tsx
Fixes
https://github.com/formbricks/internal/issues/183
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated