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

fix: Resolve the error coming up during local project setup #56

Merged
merged 2 commits into from
Aug 18, 2024

Conversation

keerthi538
Copy link
Contributor

@keerthi538 keerthi538 commented Dec 26, 2023

πŸ› οΈ Fixes Issue

Closes #53

πŸ‘¨β€πŸ’» Changes proposed

βœ”οΈ Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Copy link

vercel bot commented Dec 26, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
drip-ui βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Aug 18, 2024 5:51pm

Copy link

@mrcoder991 mrcoder991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good refactor to avoid typeof window !== 'undefined' error. A few improvements suggested below

const initDimensions = {
height: 0,
width: 0,
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initDimensions object is a good addition. This ensures initial state is predictable.

@@ -13,18 +15,21 @@ export default function useWindowDimensions() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the useWindowDimensions function, you don't need to pass hasWindow to getWindowDimensions since it's already defined inside useEffect. The hasWindow check can just be used directly.

@khazifire khazifire merged commit 4fb7b2e into khazifire:main Aug 18, 2024
2 checks passed
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.

[BUG] Error during project installation
3 participants