diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 533153b..fa49e7e 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,24 +1,20 @@ import AppWrapper from "@/components/AppWrapper"; -import ItemCard from "@/components/ItemCard"; -import directus, { type Project } from "@/utils/directus"; -import { useBreakpointValue } from "@/utils/helpers"; -import { readItems, readSingleton } from "@directus/sdk"; +import directus from "@/utils/directus"; +import { readSingleton } from "@directus/sdk"; import { GetStaticPropsResult, type NextPage } from "next"; import Head from "next/head"; import Link from "next/link"; -import { useEffect } from "react"; import Balancer from "react-wrap-balancer"; type IndexProps = { tagline: string; - projects: Project[]; buttons: { text: string; href: string }[]; }; export async function getStaticProps(): Promise< GetStaticPropsResult > { - const [metadata, projects] = await Promise.all([directus.request(readSingleton("metadata")), directus.request(readItems("project"))]); + const metadata = await directus.request(readSingleton("metadata")); const resumeUrl = `${directus.url}assets/${metadata.resume}/${ metadata.resumeFilename ?? "resume.pdf" @@ -27,7 +23,6 @@ export async function getStaticProps(): Promise< return { props: { tagline: metadata.tagline, - projects, buttons: [ { text: "GitHub", href: "https://github.com/Xevion" }, { text: "Projects", href: "/projects" }, @@ -42,17 +37,8 @@ export async function getStaticProps(): Promise< const Home: NextPage = ({ tagline, - projects, buttons, }: IndexProps) => { - const useLong = useBreakpointValue("sm", true, false); - - // use-tailwind-breakpoint - useEffect(() => { - if (typeof window !== "undefined") - window.dispatchEvent(new Event("resize")); - }, []); - return ( <> @@ -85,20 +71,6 @@ const Home: NextPage = ({ {tagline} -
-
-
- {projects.map((project) => { - return ( - ); - })} -
-
-