blueberry-website/app/page.tsx

28 lines
802 B
TypeScript
Raw Normal View History

2026-07-05 09:18:46 +00:00
"use client";
import { useEffect, useState } from "react";
import { MobileLanding, DesktopLanding } from "@/components/landing_page";
2026-07-02 18:35:42 +00:00
export default function Home() {
2026-07-05 09:18:46 +00:00
const [isMobile, setIsMobile] = useState(false); // start as null
useEffect(() => {
const handleResize = () => {
const aspectRatio = window.innerWidth / window.innerHeight;
console.log("Aspect Ratio:", aspectRatio);
setIsMobile(aspectRatio < 1);
};
handleResize();
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, []);
2026-07-02 18:35:42 +00:00
return (
2026-07-05 09:18:46 +00:00
<div
id="main container"
className="font-['Space_Grotesk'] flex flex-col items-center grow"
>
{isMobile ? <MobileLanding /> : <DesktopLanding />}
2026-07-02 18:35:42 +00:00
</div>
);
}