fix: slot picker scroll position not consistent (#7282)
* fix: remove old scroll to method * feat: add scroll into view
This commit is contained in:
1 parent
944ff68463
commit
0815ab715b
2 files changed
+12
-12
No files matched your search
@@ -6,7 +6,6 @@ import { useEmbedStyles } from "@calcom/embed-core/embed-iframe";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import useMediaQuery from "@calcom/lib/hooks/useMediaQuery";
|
||||
import { weekdayNames } from "@calcom/lib/weekday";
|
||||
import { Button, SkeletonText } from "@calcom/ui";
|
||||
import { FiArrowRight } from "@calcom/ui/components/icon";
|
||||
@@ -139,8 +138,6 @@ const Days = ({
|
||||
days.push(date);
|
||||
}
|
||||
|
||||
const isMobile = useMediaQuery("(max-width: 768px)");
|
||||
|
||||
return (
|
||||
<>
|
||||
{days.map((day, idx) => (
|
||||
@@ -159,13 +156,6 @@ const Days = ({
|
||||
date={day}
|
||||
onClick={() => {
|
||||
props.onChange(day);
|
||||
isMobile &&
|
||||
setTimeout(() => {
|
||||
window.scrollTo({
|
||||
top: 360,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}, 500);
|
||||
}}
|
||||
disabled={
|
||||
(includedDates && !includedDates.includes(yyyymmdd(day))) ||
|
||||
|
||||
Reference in new issue
Block a user