Skip to content

Commit fe03688

Browse files
committed
Fixed broken hero spacing
1 parent 49c149d commit fe03688

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/app/globals.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ textarea {
1717
body {
1818
font-family: "Inter", sans-serif;
1919
background-color: #ffffff;
20+
overflow-x: hidden;
2021
}
2122

2223

src/components/events/CalendarDays.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FirebaseEvent } from "@/types/events";
22
import { format, isSameDay } from "date-fns";
3-
import CalendarEvent from "./CalendarEvent";
43
import CalendarDay from "./CalendarDay";
54

65
type CalendarDaysProps = {

src/components/events/CalendarEvent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const CalendarEvent: React.FC<CalendarEventProps> = ({ _event }) => {
1111

1212
const handleEventClick = () => {
1313
setShowEventModal((prev) => !prev);
14-
document.body.style.overflow =
15-
document.body.style.overflow === "hidden" ? "auto" : "hidden";
14+
document.body.style.overflowY =
15+
document.body.style.overflowY === "hidden" ? "auto" : "hidden";
1616
};
1717

1818
const time = _event.time.toDate().toLocaleString("en-US", {
@@ -35,8 +35,8 @@ const CalendarEvent: React.FC<CalendarEventProps> = ({ _event }) => {
3535

3636
useEffect(() => {
3737
return () => {
38-
if (document.body.style.overflow === "hidden") {
39-
document.body.style.overflow = "auto";
38+
if (document.body.style.overflowY === "hidden") {
39+
document.body.style.overflowY = "auto";
4040
}
4141
};
4242
}, []);

src/components/events/MobileCalendarEvent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const MobileCalendarEvent: React.FC<MobileCalendarEventProps> = ({
1818
const handleEventClick = () => {
1919
setShowEventModal((prev) => !prev);
2020
document.body.style.overflow =
21-
document.body.style.overflow === "hidden" ? "auto" : "hidden";
21+
document.body.style.overflowY === "hidden" ? "auto" : "hidden";
2222
};
2323

2424
useEffect(() => {
2525
return () => {
2626
if (document.body.style.overflow === "hidden") {
27-
document.body.style.overflow = "auto";
27+
document.body.style.overflowY = "auto";
2828
}
2929
};
3030
}, []);

src/components/landing/Hero.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {motion} from "framer-motion"
55

66
export default function Hero() {
77
return (
8-
<div className="hero relative pb-12 sm:pb-28 pt-24 sm:pt-24 text-[#eaeaea] sm:h-[max(100svh,840px)]">
8+
<div className="hero relative pb-12 lg:pt-24 pt-24 text-[#eaeaea] lg:h-[max(100svh,840px)]">
99
<div className="mx-auto flex h-full max-w-7xl flex-col-reverse items-center px-6 pb-6 sm:px-10 lg:mt-0 lg:flex-row">
10-
<div className="flex w-full flex-col items-center text-center lg:w-3/4 lg:items-start lg:text-left">
10+
<div className="flex w-full flex-col items-center text-center lg:w-3/4 lg:items-start lg:text-left">
1111
<span className="hidden rounded-full border border-[#B0B8FF] border-opacity-40 bg-black bg-opacity-50 px-4 py-1.5 text-xs lg:inline">
1212
1000+ Active Members!
1313
</span>
@@ -44,7 +44,7 @@ export default function Hero() {
4444
{/* <div className="hidden max-h-[220px] cursor-grab items-center sm:flex lg:w-1/4">
4545
<Scene />
4646
</div> */}
47-
<motion.div className="relative h-[240px] w-[240px] md:h-[460px] md:w-[460px] -mr-6 lg:-mr-12" initial={{ opacity: 0, y: 60 }}
47+
<motion.div className="relative h-[240px] w-[240px] md:h-[300px] md:w-[300px] lg:h-[460px] lg:w-[460px] -mr-6 lg:-mr-12" initial={{ opacity: 0, y: 60 }}
4848
whileInView={{ opacity: 1, y: 0 }}
4949
transition={{ duration: 0.4, ease: "easeOut" }}
5050
viewport={{ once: true, amount: 0.3 }}>

0 commit comments

Comments
 (0)