-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
booking page: only scroll to bottom on mobile #6453
Conversation
CAL-774 Calendar widget on iPads
Short description of the issue: For some devices on a page with embedded iFrame the timeslots become invisible after being chosen the second time. Environment:
Steps to reproduce:
Actual Result: When a date is selected a second time, the time slots component moves up and becomes invisible |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
// lets refactor and move this into packages/lib/hooks/ | ||
import { useState, useEffect } from "react"; | ||
|
||
const useMediaQuery = (query: string) => { |
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.
@zomars can you explain me why some lib/hooks are in /apps/web and others in packages/libs/hooks?
What is the decision making process of where the hook should go?
the useMediaQuery hook seems to be reusable in all of our apps so I am surprised to find it here.
I duplicated the code now because I am not sure if we want to refactor or keep it separate
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.
if we want to refactor, lets move this into packages and adjust the imports
const isMobile = useMediaQuery("(max-width: 768px)"); | ||
|
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.
note: i was initially looking for something that would use our tailwind config but sometimes you want to trigger this on a pixel-perfect level and not based on tailwind sm
or md
.. breakpoints so we'll keep this pixel based
fixes #6452
previously we scrolled at any view point which causes issues on tablet if the outside container is too big when embedded.
todo: