diff --git a/frontend-react/src/components/builds/BuildsPage.tsx b/frontend-react/src/components/builds/BuildsPage.tsx index 629a2f99a..35d1f438c 100644 --- a/frontend-react/src/components/builds/BuildsPage.tsx +++ b/frontend-react/src/components/builds/BuildsPage.tsx @@ -23,7 +23,7 @@ import InfiniteScroll from "react-infinite-scroller" import PageHeader from "../common/PageHeader" import AbilitySelector from "./AbilitySelector" import Alert from "../elements/Alert" -import { useTranslation, Trans } from "react-i18next" +import { useTranslation } from "react-i18next" const BuildsPage: React.FC = () => { const { themeColor } = useContext(MyThemeContext) diff --git a/frontend-react/src/components/calendar/CalendarPage.tsx b/frontend-react/src/components/calendar/CalendarPage.tsx index 4a1a87dc1..2522e5853 100644 --- a/frontend-react/src/components/calendar/CalendarPage.tsx +++ b/frontend-react/src/components/calendar/CalendarPage.tsx @@ -11,7 +11,6 @@ import { } from "../../graphql/queries/upcomingEvents" import MyThemeContext from "../../themeContext" import { getWeek } from "../../utils/helperFunctions" -import { days } from "../../utils/lists" import Error from "../common/Error" import Loading from "../common/Loading" import PageHeader from "../common/PageHeader" @@ -19,12 +18,6 @@ import SubHeader from "../common/SubHeader" import Input from "../elements/Input" import TournamentInfo from "./TournamentInfo" -const badgeColor: { [key: string]: string } = { - Friday: "purple", - Saturday: "green", - Sunday: "blue", -} as const - const CalendarPage: React.FC = () => { const { darkerBgColor, grayWithShade } = useContext(MyThemeContext) const { t, i18n } = useTranslation() @@ -77,7 +70,6 @@ const CalendarPage: React.FC = () => { const time = new Date(parseInt(event.date)) const weekNumber = getWeek(time) const thisDay = time.getDate() - const thisDayOfTheWeek = days[time.getDay()] const thisMonth = time.getMonth() const printWeekHeader = weekNumber !== lastPrintedWeek const printDayHeader = @@ -90,8 +82,6 @@ const CalendarPage: React.FC = () => { lastPrintedMonth = thisMonth } - const colorForBadge = badgeColor[thisDayOfTheWeek] ?? "red" - return ( {printWeekHeader ? ( diff --git a/frontend-react/src/components/common/Flag.tsx b/frontend-react/src/components/common/Flag.tsx index 44b220428..c994c8e97 100644 --- a/frontend-react/src/components/common/Flag.tsx +++ b/frontend-react/src/components/common/Flag.tsx @@ -1,6 +1,5 @@ import React from "react" import { CountryCode } from "../../types" -import { countries } from "../../utils/lists" import { useTranslation } from "react-i18next" interface FlagProps { diff --git a/frontend-react/src/components/elements/RadioGroup.tsx b/frontend-react/src/components/elements/RadioGroup.tsx index 0966dc9c1..822f39ceb 100644 --- a/frontend-react/src/components/elements/RadioGroup.tsx +++ b/frontend-react/src/components/elements/RadioGroup.tsx @@ -29,12 +29,12 @@ const RadioGroup: React.FC = ({ onChange={(e) => setValue(e.target.value)} value={value} > - {options.map(({ label, value }) => ( + {options.map(({ label, value: valueOfOption }) => ( {label} diff --git a/frontend-react/src/components/freeagents/FreeAgentCard.tsx b/frontend-react/src/components/freeagents/FreeAgentCard.tsx index 6e7347216..3cb924c12 100644 --- a/frontend-react/src/components/freeagents/FreeAgentCard.tsx +++ b/frontend-react/src/components/freeagents/FreeAgentCard.tsx @@ -6,7 +6,6 @@ import { Link } from "@reach/router" import MyThemeContext from "../../themeContext" import { FaTwitter, FaPlus, FaMinus } from "react-icons/fa" import { top500 } from "../../assets/imageImports" -import { countries } from "../../utils/lists" import Flag from "../common/Flag" import RoleIcons from "./RoleIcons" import WeaponImage from "../common/WeaponImage" diff --git a/frontend-react/src/components/freeagents/FreeAgentsPage.tsx b/frontend-react/src/components/freeagents/FreeAgentsPage.tsx index 231d4cecb..8edcb195a 100644 --- a/frontend-react/src/components/freeagents/FreeAgentsPage.tsx +++ b/frontend-react/src/components/freeagents/FreeAgentsPage.tsx @@ -27,7 +27,7 @@ import { } from "../../graphql/queries/freeAgentMatches" import Matches from "./Matches" import Alert from "../elements/Alert" -import { useTranslation, Trans } from "react-i18next" +import { useTranslation } from "react-i18next" const playstyleToEnum = { "Frontline/Slayer": "FRONTLINE", @@ -167,10 +167,6 @@ const FreeAgentsPage: React.FC = () => { ) } - const name = userData!.user!.username - const disc = userData!.user!.discord_id - const matchFullName = `${name}#${disc}` - return ( <> diff --git a/frontend-react/src/components/home/Stats.tsx b/frontend-react/src/components/home/Stats.tsx index d10d05eb9..b81eeceaa 100644 --- a/frontend-react/src/components/home/Stats.tsx +++ b/frontend-react/src/components/home/Stats.tsx @@ -49,8 +49,6 @@ const Stats: React.FC = () => { return <>{value} } - const getStatString = (_asd: any) => 2 - const xRankMonthCount = xRankMonths() return ( diff --git a/frontend-react/src/components/root/Footer.tsx b/frontend-react/src/components/root/Footer.tsx index 890e39227..dd9842afc 100644 --- a/frontend-react/src/components/root/Footer.tsx +++ b/frontend-react/src/components/root/Footer.tsx @@ -1,10 +1,7 @@ -import { Box, Flex, Icon, Image } from "@chakra-ui/core" -import { Link } from "@reach/router" +import { Box, Image } from "@chakra-ui/core" import React, { useContext, useState, Suspense } from "react" -import { FaGithub, FaTwitch, FaTwitter } from "react-icons/fa" import { footerOcto, footerSquid } from "../../assets/imageImports" import MyThemeContext from "../../themeContext" -import { useTranslation } from "react-i18next" import FooterContent from "./FooterContent" const Footer: React.FC = () => { diff --git a/frontend-react/src/components/root/FooterContent.tsx b/frontend-react/src/components/root/FooterContent.tsx index 7da4934f2..d496f5792 100644 --- a/frontend-react/src/components/root/FooterContent.tsx +++ b/frontend-react/src/components/root/FooterContent.tsx @@ -5,11 +5,9 @@ import { Link } from "@reach/router" import { FaGithub } from "react-icons/fa" import MyThemeContext from "../../themeContext" -interface FooterContentProps {} - -const FooterContent: React.FC = ({}) => { +const FooterContent: React.FC = () => { const { t } = useTranslation() - const { themeColorWithShade, colorMode } = useContext(MyThemeContext) + const { themeColorWithShade } = useContext(MyThemeContext) return ( = () => { diff --git a/frontend-react/src/components/user/ModesAccordion.tsx b/frontend-react/src/components/user/ModesAccordion.tsx index 62f422200..344f5ea5b 100644 --- a/frontend-react/src/components/user/ModesAccordion.tsx +++ b/frontend-react/src/components/user/ModesAccordion.tsx @@ -1,6 +1,6 @@ import React, { useContext } from "react" import { Placement } from "../../types" -import { modesShort, months } from "../../utils/lists" +import { modesShort } from "../../utils/lists" import { Accordion, AccordionItem, diff --git a/frontend-react/src/components/user/ProfileModal.tsx b/frontend-react/src/components/user/ProfileModal.tsx index 2207a50d1..7f9545f77 100644 --- a/frontend-react/src/components/user/ProfileModal.tsx +++ b/frontend-react/src/components/user/ProfileModal.tsx @@ -66,7 +66,7 @@ const ProfileModal: React.FC = ({ } else { setError(null) } - }, [profile]) + }, [profile, t]) const handleChange = (newValueObject: UpdateUserVars) => { setProfile({ ...profile, ...newValueObject }) diff --git a/frontend-react/src/components/user/UserPage.tsx b/frontend-react/src/components/user/UserPage.tsx index 8bf030cad..c71a7fa32 100644 --- a/frontend-react/src/components/user/UserPage.tsx +++ b/frontend-react/src/components/user/UserPage.tsx @@ -32,7 +32,6 @@ import { import { weapons } from "../../utils/lists" import Error from "../common/Error" import Loading from "../common/Loading" -import Alert from "../elements/Alert" import Markdown from "../elements/Markdown" import AvatarWithInfo from "./AvatarWithInfo" import BuildTab from "./BuildTab" diff --git a/frontend-react/src/components/xsearch/Top500BrowserPage.tsx b/frontend-react/src/components/xsearch/Top500BrowserPage.tsx index d503fed52..fcca7e6f0 100644 --- a/frontend-react/src/components/xsearch/Top500BrowserPage.tsx +++ b/frontend-react/src/components/xsearch/Top500BrowserPage.tsx @@ -14,7 +14,7 @@ import { import useBreakPoints from "../../hooks/useBreakPoints" import MyThemeContext from "../../themeContext" import { Weapon } from "../../types" -import { modesShort, months } from "../../utils/lists" +import { modesShort } from "../../utils/lists" import Error from "../common/Error" import Loading from "../common/Loading" import PageHeader from "../common/PageHeader" diff --git a/frontend-react/src/components/xtrends/ModeButtons.tsx b/frontend-react/src/components/xtrends/ModeButtons.tsx index 5ff35988f..9cca5876d 100644 --- a/frontend-react/src/components/xtrends/ModeButtons.tsx +++ b/frontend-react/src/components/xtrends/ModeButtons.tsx @@ -4,7 +4,6 @@ import sz from "../../assets/sz.png" import tc from "../../assets/tc.png" import rm from "../../assets/rm.png" import cb from "../../assets/cb.png" -import tw from "../../assets/tw.png" import { useTranslation } from "react-i18next" interface ModeButtonsProps { diff --git a/frontend-react/src/components/xtrends/XTrendsPage.tsx b/frontend-react/src/components/xtrends/XTrendsPage.tsx index 67aaaab83..792fc6664 100644 --- a/frontend-react/src/components/xtrends/XTrendsPage.tsx +++ b/frontend-react/src/components/xtrends/XTrendsPage.tsx @@ -23,10 +23,7 @@ import WeaponLineChart from "./WeaponLineChart" import { Helmet } from "react-helmet-async" import Alert from "../elements/Alert" import { useTranslation } from "react-i18next" -import { - getLocalizedMonthYearString, - parseAndGetLocalizedMonthYear, -} from "../../utils/helperFunctions" +import { parseAndGetLocalizedMonthYear } from "../../utils/helperFunctions" const tiers = [ {