summaryrefslogtreecommitdiffstats
path: root/src/index.ts
blob: 79c88d2e0c138fafebe196df4de0d5ad7d8e7153 (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:8001/getFridge.php?name=" + i.value)).text()
  sessionStorage.fridge = res;
  location.href = "/main.html"
}
declare global {
  interface Window { goToMain: () => void; }
}
window.goToMain = goToMain