summaryrefslogtreecommitdiffstats
path: root/src/index.ts
blob: 79d5386237fcc2ffccb274ef41cc8d4d1293e02a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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