Skip to content

Commit

Permalink
fix: GResult component #190
Browse files Browse the repository at this point in the history
  • Loading branch information
habdevs committed Sep 7, 2023
1 parent e52699a commit d52229d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
32 changes: 0 additions & 32 deletions components/GameResult/GameResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import team from 'data/team.json';
import { BlockPayedGame, CustomButton } from 'components/shared';
import { TeamMemberBasic } from 'components/shared/ui/TeamMemberBasic';
import { useGameStateContext } from '../../contexts/GameStateContext';
import { Player } from '../Player';
import { PlayerI } from '../../types/game';
import { Players } from '../Players';
import { ScoreCard } from './ScoreCard';

export const GameResult = () => {
Expand All @@ -29,17 +26,6 @@ export const GameResult = () => {

console.log('Данные из finishResult в GameResult: ', finishResult);
console.log('Данные из winner: ', winner);
// if (playerResult !== null) {
// const players = playerResult
// }

// const players = playerResult as unknown as PlayerI[];
//
// const player1 = players[0]
// const player2 = players[1]

// const player1 = playerResult?.players ? players : [0];
// const player2 = playerResult?.players ? players : [1];
console.log('Данные из playerResult в GameResult', playerResult);

return (
Expand Down Expand Up @@ -68,10 +54,6 @@ export const GameResult = () => {
</h1>
)}
<div className={styles.containerCard}>
{/*<Players player1={players[0]} player2={players[1]} {...props}/>*/}
{/*<Player {...player2} />*/}
{/*<Player {...player1} />*/}
{/*<Players player1={players ? players : [0]} player2={players ? players : [1]} {...props} />*/}
{playerResult.length === 2 && (
<>
<ScoreCard finishResult={finishResult} playerResult={playerResult[0]} />
Expand Down Expand Up @@ -133,17 +115,3 @@ export const GameResult = () => {
);
};

// const player1 = {
// playerName: '0xh20...7260',
// playerImg: playerImg,
// showWinText: setFinishResult?.winner === true,
// gameType: 'tic-tac-toe',
// icon: gameType === 'tic-tac-toe' ? <XIcon /> : <PurpleIcon />,
// };
// const player2 = {
// playerName: '0xh07...6035',
// playerImg: playerImg2,
// showWinText: setFinishResult?.winner === false,
// gameType: 'tic-tac-toe',
// icon: gameType === 'tic-tac-toe' ? <OIcon /> : <WhiteIcon />,
// };
2 changes: 1 addition & 1 deletion components/shared/ui/CustomButton/CustomButtonProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface ICustomButtonProps {
disabled?: boolean;
onClick: () => Promise<void>;
onClick?: () => Promise<void>;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: 'transparent' | 'dark' | 'gradient';
textColor?: string;
Expand Down

0 comments on commit d52229d

Please sign in to comment.