From 9ebb25427ab4c8bb0f0edfe339471080204b9b52 Mon Sep 17 00:00:00 2001
From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Date: Sun, 25 Jun 2023 17:51:24 -0700
Subject: remove very old stuff

---
 src/api/demo/pages/index.tsx | 68 --------------------------------------------
 1 file changed, 68 deletions(-)
 delete mode 100644 src/api/demo/pages/index.tsx

(limited to 'src/api/demo/pages/index.tsx')

diff --git a/src/api/demo/pages/index.tsx b/src/api/demo/pages/index.tsx
deleted file mode 100644
index 1f6e4bb82..000000000
--- a/src/api/demo/pages/index.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import Head from "next/head";
-import Image from "next/image";
-import styles from "../styles/Home.module.css";
-import { readFile } from "fs/promises";
-
-import React from "react";
-
-if (typeof window !== "undefined") {
-  globalThis.Run = await import("../lib/run");
-  await import("../lib/api");
-}
-
-export async function getStaticProps(ctx) {
-  return {
-    props: {
-      // not tested
-      code: readFile("/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js", { encoding: "utf-8" }),
-    },
-  };
-}
-
-var textDecoder = new TextDecoder();
-export default function Home({ code }) {
-  const fileNameRef = React.useRef<HTMLInputElement>(null);
-  const [esbuildResult, setEsbuildResult] = React.useState("");
-  const [bunResult, setBunResult] = React.useState("");
-  const [swcResult, setSWCResult] = React.useState("");
-  React.useEffect(() => {
-    globalThis.Run.start();
-  }, []);
-
-  const runBuild = React.useCallback(
-    event => {
-      globalThis.Run.transform(event.target.value, fileNameRef?.current?.value).then(result => {
-        setEsbuildResult(result.esbuild.code);
-        setBunResult(textDecoder.decode(result.bun.files[0].data));
-        setSWCResult(result.swc.code);
-      }, console.error);
-    },
-    [fileNameRef, setEsbuildResult, setBunResult, setSWCResult],
-  );
-  return (
-    <div className={styles.container}>
-      <Head>
-        <title>Next.js</title>
-        <meta name="description" content="Generated by create next app" />
-        <link rel="icon" href="/favicon.ico" />
-      </Head>
-
-      <main className={styles.main}>
-        <div>
-          <input
-            autoComplete="filename"
-            type="text"
-            placeholder="filename"
-            defaultValue="input.tsx"
-            ref={fileNameRef}
-          />
-          <textarea onChange={runBuild} defaultValue={code}></textarea>
-
-          <textarea readOnly value={esbuildResult}></textarea>
-          <textarea readOnly value={bunResult}></textarea>
-          <textarea readOnly value={swcResult}></textarea>
-        </div>
-      </main>
-    </div>
-  );
-}
-- 
cgit v1.2.3

