From 94071d7ce16c56641d67d488e2bac6be84ffe731 Mon Sep 17 00:00:00 2001
From: 简律纯 <i@jyunko.cn>
Date: Fri, 3 Nov 2023 21:17:06 +0800
Subject: chore: delete useless files

---
 examples/with-docker/apps/web/src/pages/index.tsx | 65 -----------------------
 1 file changed, 65 deletions(-)
 delete mode 100644 examples/with-docker/apps/web/src/pages/index.tsx

(limited to 'examples/with-docker/apps/web/src/pages/index.tsx')

diff --git a/examples/with-docker/apps/web/src/pages/index.tsx b/examples/with-docker/apps/web/src/pages/index.tsx
deleted file mode 100644
index 6a82f97..0000000
--- a/examples/with-docker/apps/web/src/pages/index.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import { useEffect, useState } from "react";
-import { Button } from "ui";
-
-const API_HOST = process.env.NEXT_PUBLIC_API_HOST || "http://localhost:3001";
-
-export default function Web() {
-  const [name, setName] = useState<string>("");
-  const [response, setResponse] = useState<{ message: string } | null>(null);
-  const [error, setError] = useState<string | undefined>();
-
-  useEffect(() => {
-    setResponse(null);
-    setError(undefined);
-  }, [name]);
-
-  const onChange = (e: React.ChangeEvent<HTMLInputElement>) =>
-    setName(e.target.value);
-
-  const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
-    e.preventDefault();
-
-    try {
-      const result = await fetch(`${API_HOST}/message/${name}`);
-      const response = await result.json();
-      setResponse(response);
-    } catch (err) {
-      console.error(err);
-      setError("Unable to fetch response");
-    }
-  };
-
-  const onReset = () => {
-    setName("");
-  };
-
-  return (
-    <div>
-      <h1>Web</h1>
-      <form onSubmit={onSubmit}>
-        <label htmlFor="name">Name </label>
-        <input
-          type="text"
-          name="name"
-          id="name"
-          value={name}
-          onChange={onChange}
-        ></input>
-        <Button type="submit">Submit</Button>
-      </form>
-      {error && (
-        <div>
-          <h3>Error</h3>
-          <p>{error}</p>
-        </div>
-      )}
-      {response && (
-        <div>
-          <h3>Greeting</h3>
-          <p>{response.message}</p>
-          <Button onClick={onReset}>Reset</Button>
-        </div>
-      )}
-    </div>
-  );
-}
-- 
cgit v1.2.3-70-g09d2

