diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 3c6cf0e..c1ff8c5 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,6 +1,5 @@ "use client"; -import Link from "next/link"; import Image from "next/image"; import { FaTelegram, FaXTwitter } from "react-icons/fa6"; import { useState } from "react"; diff --git a/src/components/PrivyButton.tsx b/src/components/PrivyButton.tsx index ed7c86b..d05d548 100644 --- a/src/components/PrivyButton.tsx +++ b/src/components/PrivyButton.tsx @@ -25,6 +25,14 @@ interface GameHistory { game: string; } +interface User { + id: string; + twitter?: { + username: string | null; + profilePictureUrl: string | null; + }; +} + interface Opponent { username: string; x_profile_url: string; @@ -32,14 +40,14 @@ interface Opponent { const GameHistoryItem = ({ game, user, gameImages, defaultPFP, failedImages, setFailedImages, handleViewTxClick }: { game: GameHistory, - user: any, + user: User, gameImages: { [key: string]: string }, defaultPFP: string, failedImages: Set, setFailedImages: React.Dispatch>>, handleViewTxClick: (address: string) => void }) => { - const [opponent, setOpponent] = useState(null); + const [opponent, setOpponent] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { @@ -146,7 +154,6 @@ export default function PrivyButton() { const [solWallet, setSolWallet] = useState(""); const [solBalance, setSolBalance] = useState("--"); const [gamesHistory, setGamesHistory] = useState([]); - const [opponentInfo, setOpponentInfo] = useState<{ [key: string]: Opponent }>({}); const [gameImages, setGameImages] = useState<{ [key: string]: string }>({}); const [loading, setLoading] = useState(false); const [failedImages, setFailedImages] = useState>(new Set()); @@ -390,8 +397,6 @@ export default function PrivyButton() { }) ); - setOpponentInfo(fetchedOpponentInfo); - const gameDataWithImages: { [key: string]: string } = {}; await Promise.all( gameData.map(async (gameHistory: GameHistory) => {