Update Home.jsx

This commit is contained in:
Ethan O'Brien 2024-05-04 19:01:06 -05:00
parent 3aabe2874e
commit d4e9e74653

View file

@ -72,9 +72,8 @@ function Home() {
} }
const handleSubmit = async (event) => { const handleSubmit = async (event) => {
event.preventDefault(); event.preventDefault();
let input = parseInt(inputValue.trim());
let time = Math.round((new Date(inputValue.trim()).getTime() + 70000) / 1000); let time = Math.round((new Date(inputValue.trim()).getTime() + 70000) / 1000);
if (input === -1) { if (inputValue.trim() === "-1") {
time = 1711741114; time = 1711741114;
} }
if (time < 0 || isNaN(time)) return; if (time < 0 || isNaN(time)) return;