build errors fixed
This commit is contained in:
parent
4c75d08d4a
commit
2383730d0f
|
|
@ -1,6 +1,5 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import Link from "next/link";
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { FaTelegram, FaXTwitter } from "react-icons/fa6";
|
import { FaTelegram, FaXTwitter } from "react-icons/fa6";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,14 @@ interface GameHistory {
|
||||||
game: string;
|
game: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
id: string;
|
||||||
|
twitter?: {
|
||||||
|
username: string | null;
|
||||||
|
profilePictureUrl: string | null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
interface Opponent {
|
interface Opponent {
|
||||||
username: string;
|
username: string;
|
||||||
x_profile_url: string;
|
x_profile_url: string;
|
||||||
|
|
@ -32,14 +40,14 @@ interface Opponent {
|
||||||
|
|
||||||
const GameHistoryItem = ({ game, user, gameImages, defaultPFP, failedImages, setFailedImages, handleViewTxClick }: {
|
const GameHistoryItem = ({ game, user, gameImages, defaultPFP, failedImages, setFailedImages, handleViewTxClick }: {
|
||||||
game: GameHistory,
|
game: GameHistory,
|
||||||
user: any,
|
user: User,
|
||||||
gameImages: { [key: string]: string },
|
gameImages: { [key: string]: string },
|
||||||
defaultPFP: string,
|
defaultPFP: string,
|
||||||
failedImages: Set<string>,
|
failedImages: Set<string>,
|
||||||
setFailedImages: React.Dispatch<React.SetStateAction<Set<string>>>,
|
setFailedImages: React.Dispatch<React.SetStateAction<Set<string>>>,
|
||||||
handleViewTxClick: (address: string) => void
|
handleViewTxClick: (address: string) => void
|
||||||
}) => {
|
}) => {
|
||||||
const [opponent, setOpponent] = useState<any>(null);
|
const [opponent, setOpponent] = useState<Opponent | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -146,7 +154,6 @@ export default function PrivyButton() {
|
||||||
const [solWallet, setSolWallet] = useState("");
|
const [solWallet, setSolWallet] = useState("");
|
||||||
const [solBalance, setSolBalance] = useState("--");
|
const [solBalance, setSolBalance] = useState("--");
|
||||||
const [gamesHistory, setGamesHistory] = useState<GameHistory[]>([]);
|
const [gamesHistory, setGamesHistory] = useState<GameHistory[]>([]);
|
||||||
const [opponentInfo, setOpponentInfo] = useState<{ [key: string]: Opponent }>({});
|
|
||||||
const [gameImages, setGameImages] = useState<{ [key: string]: string }>({});
|
const [gameImages, setGameImages] = useState<{ [key: string]: string }>({});
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [failedImages, setFailedImages] = useState<Set<string>>(new Set());
|
const [failedImages, setFailedImages] = useState<Set<string>>(new Set());
|
||||||
|
|
@ -390,8 +397,6 @@ export default function PrivyButton() {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
setOpponentInfo(fetchedOpponentInfo);
|
|
||||||
|
|
||||||
const gameDataWithImages: { [key: string]: string } = {};
|
const gameDataWithImages: { [key: string]: string } = {};
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
gameData.map(async (gameHistory: GameHistory) => {
|
gameData.map(async (gameHistory: GameHistory) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user