import { existsSync } from "node:fs";
import { join } from "node:path";
import { HomeView } from "@/components/sections/HomeView";

export default function Page() {
  const videoPath = "/videos/solar-morning-to-night.mp4";
  const heroVideoSrc = existsSync(join(process.cwd(), "public", videoPath.slice(1)))
    ? videoPath
    : undefined;

  return <HomeView heroVideoSrc={heroVideoSrc} />;
}
