-
Notifications
You must be signed in to change notification settings - Fork 429
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
Show more CNS monitors on large displays #7440
Conversation
@MjStar24 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const size = useBreakpoints({ "4k": 2560, default: 1920 }); | ||
|
||
useEffect(() => { | ||
if (size < LARGE_SCREEN_WIDTH) { | ||
setPerPageLimit(PER_PAGE_LIMIT); | ||
} else { | ||
setPerPageLimit(PER_PAGE_LIMIT_LARGE); | ||
} | ||
}, [size]); | ||
|
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.
You don't need a useState
nor useEffect
when using useBreakpoints
since you could directly set the per page limits.
const size = useBreakpoints({ "4k": 2560, default: 1920 }); | |
useEffect(() => { | |
if (size < LARGE_SCREEN_WIDTH) { | |
setPerPageLimit(PER_PAGE_LIMIT); | |
} else { | |
setPerPageLimit(PER_PAGE_LIMIT_LARGE); | |
} | |
}, [size]); | |
const perPageLimit = useBreakpoints({ "4k": 9, default: 6 }); |
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.
"My apologies, @rithviknishad. I became a bit confused with the useBreakpoints hook. I've made the necessary updates now
Cypress tests are failing: |
@MjStar24 when we are viewing the cns page of a facility, its crashing and showing a white page. |
hey @nihal467 now its working |
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.
Although it renders more monitors in 4K display, there is a lot of unused space in each of the monitor. Can we use grid-cols-5
for 4K screens? (Consider adding a breakpoint to tailwind config itself if not present).
Expected:
Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions. |
Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr. |
Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers