diff --git a/react-ui/src/components/rotation/RotationSegments.js b/react-ui/src/components/rotation/RotationSegments.js index 24bdd507d..2c4da32d2 100644 --- a/react-ui/src/components/rotation/RotationSegments.js +++ b/react-ui/src/components/rotation/RotationSegments.js @@ -6,14 +6,7 @@ import rankedIcon from "../../assets/ranked.png" import leagueIcon from "../../assets/league.png" import regularIcon from "../../assets/regular.png" -const modeShort = { - "Splat Zones": "sz", - "Tower Control": "tc", - Rainmaker: "rm", - "Clam Blitz": "cb" -} - -const RotationSegments = ({ rotation, preferences }) => { +const RotationSegments = ({ rotation }) => { const [currentTime, setCurrentTime] = useState( new Date(Math.floor(Date.now() / 1000)) ) @@ -46,13 +39,7 @@ const RotationSegments = ({ rotation, preferences }) => { {header} - + @@ -128,28 +115,12 @@ const RotationSegments = ({ rotation, preferences }) => { }} > - } + trigger={} content={r.stage_a.name} basic /> - } + trigger={} content={r.stage_b.name} basic /> diff --git a/react-ui/src/components/rotation/Rotations.js b/react-ui/src/components/rotation/Rotations.js index 2535f6f81..c82ab0a07 100644 --- a/react-ui/src/components/rotation/Rotations.js +++ b/react-ui/src/components/rotation/Rotations.js @@ -1,60 +1,31 @@ import React, { useEffect, useState } from "react" import { useQuery } from "@apollo/react-hooks" import { rotationData } from "../../graphql/queries/rotationData" -import { maplists } from "../../graphql/queries/maplists" -import { Button } from "semantic-ui-react" import Loading from "../common/Loading" import Error from "../common/Error" -import MapPreferenceSelector from "./MapPreferenceSelector" import RotationSegments from "./RotationSegments" -const Rotations = ({ setMenuSelection }) => { +const Rotations = () => { const { data, error, loading } = useQuery(rotationData) - const monthly = useQuery(maplists) const [rotation, setRotation] = useState([]) - const [preferences, setPreferences] = useState({ - sz: {}, - tc: {}, - rm: {}, - cb: {} - }) - - const [show, setShow] = useState(false) useEffect(() => { - if (loading || monthly.loading) { + if (loading) { return } document.title = "Rotations - sendou.ink" - const rotationPreferencesFromDb = window.localStorage.getItem( - "rotationPreferences" - ) - if (rotationPreferencesFromDb) { - setPreferences(JSON.parse(rotationPreferencesFromDb)) - } setRotation(JSON.parse(data.rotationData)) - }, [data, loading, monthly.loading]) + }, [data, loading]) - if (loading || monthly.loading || rotation.length === 0) return - if (error || monthly.error) return - - const monthlyMaps = monthly.data.maplists[0] + if (loading || rotation.length === 0) return + if (error) return return ( <> - setShow(!show)} /> - {show ? ( - - Uncheck a map in the ranked rotation to mark it as a disliked map. - - - ) : null} - - - + > ) } diff --git a/schemas/placement.js b/schemas/placement.js index 1637b827a..f40274ff3 100644 --- a/schemas/placement.js +++ b/schemas/placement.js @@ -147,7 +147,6 @@ const resolvers = { }) }, searchForPlacements: async (root, args) => { - console.log("args", args) const perPage = 25 const currentPage = args.page ? args.page - 1 : 0 const searchCriteria = {}