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/scan.tsx | 67 ---------------------------------------------
 1 file changed, 67 deletions(-)
 delete mode 100644 src/api/demo/pages/scan.tsx

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

diff --git a/src/api/demo/pages/scan.tsx b/src/api/demo/pages/scan.tsx
deleted file mode 100644
index 656629dda..000000000
--- a/src/api/demo/pages/scan.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import Head from "next/head";
-import { readFile } from "fs/promises";
-import styles from "../styles/Home.module.css";
-
-import React from "react";
-
-if (typeof window !== "undefined") {
-  globalThis.Scan = await import("../lib/scan");
-  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" }),
-      defaultFile: "magic-string.js",
-    },
-  };
-}
-
-var textDecoder = new TextDecoder();
-export default function Home({ code, defaultFile }) {
-  const fileNameRef = React.useRef<HTMLInputElement>(null);
-  const [lexer, setLexer] = React.useState("");
-  const [bunResult, setBunResult] = React.useState("");
-  const [file, setFile] = React.useState(defaultFile);
-  React.useEffect(() => {
-    globalThis.Scan.start();
-  }, []);
-
-  const runBuild = React.useCallback(
-    event => {
-      globalThis.Scan.transform(event.target.value, fileNameRef?.current?.value).then(result => {
-        setLexer(JSON.stringify(result.lexer, null, 2));
-        setBunResult(JSON.stringify(result.bun, null, 2));
-      }, console.error);
-    },
-    [fileNameRef, setBunResult, setLexer],
-  );
-  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"
-            value={file}
-            onChange={event => setFile(event.target.value)}
-            ref={fileNameRef}
-          />
-          <textarea onChange={runBuild} defaultValue={code}></textarea>
-
-          <textarea readOnly value={bunResult}></textarea>
-          <textarea readOnly value={lexer}></textarea>
-        </div>
-      </main>
-    </div>
-  );
-}
-- 
cgit v1.2.3

