diff --git a/components/Layout.tsx b/components/Layout.tsx index 581942ca..c320cce5 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -17,12 +17,12 @@ const Layout: React.FC = (props) => (
-
-
+
+
{props.children} +
-
-
+
diff --git a/pages/games/index.tsx b/pages/games/index.tsx new file mode 100644 index 00000000..fe8d236e --- /dev/null +++ b/pages/games/index.tsx @@ -0,0 +1,15 @@ +import Layout from "../../components/Layout" + +interface Props { } + +const Games: React.FC = (props) => { + return ( + +
+ 🚧 🚧 🚧 +
+
+ ); +} + +export default Games; diff --git a/pages/index.tsx b/pages/index.tsx index 8a8cce84..b6b7f1c7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,10 +1,6 @@ import React from "react" import { GetStaticProps } from "next" -import dynamic from "next/dynamic"; import Layout from "../components/Layout" -import Post, { PostProps } from "../components/Post" -import prisma from "../lib/prisma"; -import SpotifyIframePlaylist from "../components/SpotifyIframePlaylist"; import { Canvas } from "@react-three/fiber"; import WireframePlanet from "../components/hero-scenes/WireframePlanet"; @@ -18,54 +14,29 @@ import WireframePlanet from "../components/hero-scenes/WireframePlanet"; // ); export const getStaticProps: GetStaticProps = async () => { - const feed = await prisma.post.findMany({ - where: { published: true }, - include: { - author: { - select: { name: true }, - }, - }, - }); + // todo: determine what data to fetch in home page return { - props: { feed }, + props: {}, revalidate: 10 } } -type Props = { - feed: PostProps[] -} +interface Props {} -const Blog: React.FC = (props) => { +const Index: React.FC = (props) => { return ( -
- - - - -
-

Recent Posts

- {props.feed.map((post, i) => ( - - ))} -
- - {/* - - - - - */} -
+ + +
) } -export default Blog +export default Index; diff --git a/pages/now-playing/index.tsx b/pages/now-playing/index.tsx new file mode 100644 index 00000000..922f37be --- /dev/null +++ b/pages/now-playing/index.tsx @@ -0,0 +1,21 @@ +import Layout from "../../components/Layout" +import SpotifyIframePlaylist from "../../components/SpotifyIframePlaylist"; + +interface Props { } + +const NowPlaying: React.FC = (props) => { + return ( + +
+ + + + + + +
+
+ ); +} + +export default NowPlaying; diff --git a/pages/photos/index.tsx b/pages/photos/index.tsx new file mode 100644 index 00000000..0e264256 --- /dev/null +++ b/pages/photos/index.tsx @@ -0,0 +1,15 @@ +import Layout from "../../components/Layout" + +interface Props { } + +const Photos: React.FC = (props) => { + return ( + +
+ 🚧 🚧 🚧 +
+
+ ); +} + +export default Photos; diff --git a/pages/visualizers/index.tsx b/pages/visualizers/index.tsx new file mode 100644 index 00000000..c4ceba66 --- /dev/null +++ b/pages/visualizers/index.tsx @@ -0,0 +1,15 @@ +import Layout from "../../components/Layout" + +interface Props { } + +const Visualizers: React.FC = (props) => { + return ( + +
+ 🚧 🚧 🚧 +
+
+ ); +} + +export default Visualizers; diff --git a/pages/writing/index.tsx b/pages/writing/index.tsx new file mode 100644 index 00000000..59d7ef12 --- /dev/null +++ b/pages/writing/index.tsx @@ -0,0 +1,38 @@ +import React from "react" +import { GetStaticProps } from "next" +import Layout from "../../components/Layout" +import Post, { PostProps } from "../../components/Post" +import prisma from "../../lib/prisma"; + +export const getStaticProps: GetStaticProps = async () => { + const feed = await prisma.post.findMany({ + where: { published: true }, + include: { + author: { + select: { name: true }, + }, + }, + }); + + return { + props: { feed }, + revalidate: 10 + } +} + +type Props = { + feed: PostProps[] +} + +const Blog: React.FC = (props) => { + return ( + +

Recent Posts

+ {props.feed.map((post, i) => ( + + ))} +
+ ); +} + +export default Blog