diff --git a/Website/App.tsx b/Website/App.tsx index a03d073..7f50e70 100644 --- a/Website/App.tsx +++ b/Website/App.tsx @@ -1,4 +1,4 @@ -import React, {EventHandler, ReactElement, useEffect, useState} from 'react'; +import React, {EventHandler, useEffect} from 'react'; import Footer from "./modules/Footer"; import Search from "./modules/Search"; import Header from "./modules/Header"; diff --git a/Website/modules/Search.tsx b/Website/modules/Search.tsx index 4368c61..b199425 100644 --- a/Website/modules/Search.tsx +++ b/Website/modules/Search.tsx @@ -1,6 +1,5 @@ -import React, {ChangeEventHandler, EventHandler, MouseEventHandler, useEffect, useState} from 'react'; +import React, {ChangeEventHandler, EventHandler, useEffect, useState} from 'react'; import {MangaConnector} from "./MangaConnector"; -import {Job} from "./Job"; import IMangaConnector from "./interfaces/IMangaConnector"; import {isValidUri} from "../App"; import IManga, {SearchResult} from "./interfaces/IManga"; @@ -48,8 +47,7 @@ export default function Search({onJobsChanged, closeSearch} : {onJobsChanged: Ev return; let baseUri = match[1]; const selectCon = mangaConnectors.find((con: IMangaConnector) => { - let found = con.BaseUris.find(uri => uri == baseUri); - return found; + return con.BaseUris.find(uri => uri == baseUri); }); if(selectCon != undefined){ setSelectedConnector(selectCon); @@ -58,6 +56,7 @@ export default function Search({onJobsChanged, closeSearch} : {onJobsChanged: Ev } const ExecuteSearch : EventHandler = (event) => { + event.preventDefault(); if(searchBoxValue.length < 1 || selectedConnector === undefined || selectedLanguage === ""){ console.error("Tried initiating search while not all fields where submitted.") return; @@ -105,7 +104,7 @@ export default function Search({onJobsChanged, closeSearch} : {onJobsChanged: Ev - + Close Search
{searchResults === undefined ?