···11-import Head from "next/head";
22-import { Component } from "react";
33-import BaseLayout from "../components/BaseLayout";
44-55-export default class OfflineFallback extends Component {
66- render() {
77- return (
88- <>
99- <Head>
1010- <title>Bailey Kane</title>
1111- </Head>
1212- <BaseLayout navbarVisible={false}>
1313- <div className="w-full flex flex-col items-center">
1414- <div className="w-full max-w-md space-y-4">
1515- <div className="text-xl">
1616- <h2>Looks like you're offline, my dude. Sad 😕</h2>
1717- </div>
1818- </div>
1919- </div>
2020- </BaseLayout>
2121- </>
2222- );
2323- }
2424-}
+21
pages/_offline.tsx
···11+import Head from "next/head";
22+import BaseLayout from "@/components/BaseLayout";
33+44+export default function OfflineFallback(): React.ReactElement {
55+ return (
66+ <>
77+ <Head>
88+ <title>Bailey Kane</title>
99+ </Head>
1010+ <BaseLayout navbarVisible={false}>
1111+ <div className="w-full flex flex-col items-center">
1212+ <div className="w-full max-w-md space-y-4">
1313+ <div className="text-xl">
1414+ <h2>Looks like you're offline, my dude. Sad 😕</h2>
1515+ </div>
1616+ </div>
1717+ </div>
1818+ </BaseLayout>
1919+ </>
2020+ );
2121+}
+3-3
pages/about.js
pages/about.tsx
···11-import BaseLayout from "../components/BaseLayout";
11+import BaseLayout from "@/components/BaseLayout";
22import Link from "next/link";
3344-export default function About({}) {
44+export default function About(): React.ReactElement {
55 return (
66 <BaseLayout titleText={"About"}>
77 <div className="max-w-2xl mx-auto">
···6060 problems with fun people. I've jumped industries and roles in nearly
6161 every job I've had, and have embraced my nature as an enthusiastic
6262 generalist.
6363- <p>I now spend my time:</p>
6463 </p>
6464+ <p>I now spend my time:</p>
6565 <ul>
6666 <li>
6767 Supporting small business owners by ugprading their businesses
pages/api/garden.js
This is a binary file and will not be displayed.
+32
pages/api/garden.ts
···11+// pages/api/party.js - PartyKit API Route for Next.js Pages Router
22+import { NextApiRequest, NextApiResponse } from "next";
33+import { Server } from "partykit/server";
44+55+const flowers = [];
66+77+export default function handler(req: NextApiRequest, res: NextApiResponse) {
88+ if (req.method === "GET") {
99+ // Clean up old flowers (older than 24 hours)
1010+ const now = Date.now();
1111+ while (flowers.length && now - flowers[0].createdAt > 86400000) {
1212+ flowers.shift();
1313+ }
1414+ res.status(200).json({ flowers });
1515+ } else if (req.method === "POST") {
1616+ const newFlower = {
1717+ id: Date.now(),
1818+ createdAt: Date.now(),
1919+ color: getRandomColor(),
2020+ };
2121+ flowers.push(newFlower);
2222+ res.status(201).json(newFlower);
2323+ } else {
2424+ res.setHeader("Allow", ["GET", "POST"]);
2525+ res.status(405).end(`Method ${req.method} Not Allowed`);
2626+ }
2727+}
2828+2929+function getRandomColor(): string {
3030+ const colors = ["#FF69B4", "#FFD700", "#8A2BE2", "#FF4500", "#00FF7F"];
3131+ return colors[Math.floor(Math.random() * colors.length)];
3232+}