summaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 00391b5..79d5386 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,2 +1,12 @@
-import "@/styles/index.css";
+import "Styles/index.css";
+async function goToMain() {
+ const i = document.getElementsByTagName("input")[0]
+ const res = await (await fetch("http://localhost:8000/getFridge.php?name=" + i.value)).text()
+ sessionStorage.fridge = res;
+ location.href = "/main.html"
+}
+declare global {
+ interface Window { goToMain: () => void; }
+}
+window.goToMain = goToMain