diff --git a/src/App.tsx b/src/App.tsx index 53cff46..9327c40 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,13 @@ +import AppRoutes from 'components/AppRoutes'; +import { MatchGameProvider } from 'context/MatchGameContext'; import React from 'react'; import cls from './App.module.scss'; -import MatchGame from 'components/MatchGame/MatchGame'; -import { MatchGameProvider } from 'context/MatchGameContext'; function App() { return (
Время: {gameTime}
+Время: {getTimeString(new Date(gameTime || 0))}
Количество ошибок: {mistakesCount}
Сложность: difficultyLevel
Размер поля: fieldSize
diff --git a/src/components/MatchGame/MatchGame.tsx b/src/components/MatchGame/MatchGame.tsx index 9e29ffc..c1a724f 100644 --- a/src/components/MatchGame/MatchGame.tsx +++ b/src/components/MatchGame/MatchGame.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import BottomPanel from 'components/BottomPanel/BottomPanel'; import CardsField from 'components/CardsField/CardsField'; @@ -9,7 +9,11 @@ import { useMatchGame } from 'context/MatchGameContext'; import cls from './MatchGame.module.scss' -const MatchGame: React.FC = () => { +interface MatchGameProps { + isNewGame: boolean; +} + +const MatchGame: React.FC