From 27075885e95bd0efc062920685e04287feb4b556 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Sun, 31 Oct 2021 14:31:29 +0100 Subject: Almost the end --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index 79c88d2..4666f4c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,8 +2,10 @@ 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() + if (i.value === '') return; + const res = await (await fetch("http://localhost:8001/get-fridge.php?name=" + i.value)).text() sessionStorage.fridge = res; + sessionStorage.name = i.value; location.href = "/main.html" } declare global { -- cgit v1.3.1