Skip to content

Commit

Permalink
remove old fesl autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Dec 9, 2023
1 parent a4ed44b commit fad157e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 182 deletions.
48 changes: 0 additions & 48 deletions src/api/FeslApi.tsx

This file was deleted.

103 changes: 0 additions & 103 deletions src/components/functions/autocomplete.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions src/components/routes/Stats/Search/PlayerSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import "../../../../locales/config";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import "../../../../assets/scss/App.scss";
import { useQuery } from "@tanstack/react-query";
import { FeslApi } from "../../../../api/FeslApi";
import {
AltText,
SearchBox,
Expand All @@ -25,7 +23,6 @@ import { platformGames, statsPlatforms } from "../../../../api/static";
import { Graphs } from "./Graphs";
import ErrorBoundary from "../../../functions/ErrorBoundary";
import { useLocalStorage } from "react-use";
import { DropDownAutocomplete } from "../../../functions/autocomplete";

export const AltDescription = styled.p`
${AltText}
Expand Down Expand Up @@ -60,16 +57,6 @@ export function StatSearch(): React.ReactElement {
);
const searchBox: React.MutableRefObject<HTMLInputElement> = React.useRef();

const { data: autocompleteResult } = useQuery({
queryKey: ["autocomplete" + platform + searchTerm],
queryFn: () => {
return FeslApi.playerSearch({
platform: platform,
name: searchTerm,
});
},
});

return (
<form
style={{
Expand All @@ -86,15 +73,6 @@ export function StatSearch(): React.ReactElement {
setSearchTerm(ev.target.value)
}
/>
<DropDownAutocomplete
searchTerm={searchTerm}
searchBoxRef={searchBox}
autocompleteResult={autocompleteResult}
callback={(val) => {
setSearchTerm(val);
}}
style={{ top: "56px", left: "-20px" }}
/>
<HomePlayerBigSelectSecondary
value={platform}
onChange={(ev: React.ChangeEvent<HTMLSelectElement>): void =>
Expand Down Expand Up @@ -167,15 +145,6 @@ function Search(): React.ReactElement {
setSearchTerm(ev.target.value)
}
/>
<DropDownAutocomplete
searchTerm={searchTerm}
platform={platform}
searchBoxRef={searchBox}
callback={(val) => {
setSearchTerm(val);
}}
style={{ left: "10px" }}
/>
<BigSelectSecondary
value={platform}
onChange={(ev: React.ChangeEvent<HTMLSelectElement>): void =>
Expand Down

0 comments on commit fad157e

Please sign in to comment.