fix missing imports, cleanup
This commit is contained in:
@@ -2,8 +2,7 @@ import { useEffect, useState } from "react";
|
|||||||
import PlayerCell from "./fantasy/PlayerCell";
|
import PlayerCell from "./fantasy/PlayerCell";
|
||||||
import {
|
import {
|
||||||
NFLMatchupState,
|
NFLMatchupState,
|
||||||
NFLPlayer,
|
SleeperUser,
|
||||||
SleeperUsers,
|
|
||||||
type NFLRosterState,
|
type NFLRosterState,
|
||||||
type NFLState,
|
type NFLState,
|
||||||
} from "../utils/types";
|
} from "../utils/types";
|
||||||
@@ -26,10 +25,6 @@ export default function FantasyStatus() {
|
|||||||
const [opposingRoster, setOpposingRoster] = useState<NFLRosterState | null>(
|
const [opposingRoster, setOpposingRoster] = useState<NFLRosterState | null>(
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
const [nflState, setNflState] = useState<NFLState | null>(null);
|
|
||||||
// const [roster, setRoster] = useState<NFLRosterState | null>(null);
|
|
||||||
// const [players, setPlayers] = useState<NFLPlayer[] | null>(null);
|
|
||||||
// const [matchup, setMatchup] = useState<NFLMatchupState | null>(null);
|
|
||||||
|
|
||||||
// fetch roster information
|
// fetch roster information
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -58,7 +53,6 @@ export default function FantasyStatus() {
|
|||||||
PLAYERS_URL + "?players=" + oppMatchup.starters
|
PLAYERS_URL + "?players=" + oppMatchup.starters
|
||||||
).then((res) => res.json());
|
).then((res) => res.json());
|
||||||
|
|
||||||
setNflState(nflState);
|
|
||||||
setPersonalRoster({
|
setPersonalRoster({
|
||||||
...rosters.filter((v) => v.owner_id === USER_ID)[0],
|
...rosters.filter((v) => v.owner_id === USER_ID)[0],
|
||||||
matchup: matchups[1],
|
matchup: matchups[1],
|
||||||
@@ -75,9 +69,6 @@ export default function FantasyStatus() {
|
|||||||
|
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
useEffect(() => {
|
|
||||||
console.log(personalRoster, opposingRoster);
|
|
||||||
}, [personalRoster, opposingRoster]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border border-white border-solid rounded-lg w-full sm:w-[500px] mb-4 p-2">
|
<div className="border border-white border-solid rounded-lg w-full sm:w-[500px] mb-4 p-2">
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ const RandomLyric: FC<AutoScrollingTextProps> = ({ speed = 0.5 }) => {
|
|||||||
|
|
||||||
const getRandomLyric = () => {
|
const getRandomLyric = () => {
|
||||||
const randomNumber = Math.floor(Math.random() * lyrics.length);
|
const randomNumber = Math.floor(Math.random() * lyrics.length);
|
||||||
console.log(randomNumber);
|
|
||||||
setLyric(lyrics[randomNumber]);
|
setLyric(lyrics[randomNumber]);
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user