build errors fixed
This commit is contained in:
parent
4c75d08d4a
commit
2383730d0f
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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<string>,
|
||||
setFailedImages: React.Dispatch<React.SetStateAction<Set<string>>>,
|
||||
handleViewTxClick: (address: string) => void
|
||||
}) => {
|
||||
const [opponent, setOpponent] = useState<any>(null);
|
||||
const [opponent, setOpponent] = useState<Opponent | null>(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<GameHistory[]>([]);
|
||||
const [opponentInfo, setOpponentInfo] = useState<{ [key: string]: Opponent }>({});
|
||||
const [gameImages, setGameImages] = useState<{ [key: string]: string }>({});
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [failedImages, setFailedImages] = useState<Set<string>>(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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user