diff --git a/package-lock.json b/package-lock.json index 00bd4e6..ca0065e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", + "recoil": "^0.7.7", "sass": "^1.70.0", "typescript": "^4.9.5" }, @@ -8963,6 +8964,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hamt_plus": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hamt_plus/-/hamt_plus-1.0.2.tgz", + "integrity": "sha512-t2JXKaehnMb9paaYA7J0BX8QQAY8lwfQ9Gjf4pg/mk4krt+cmwmU652HOoWonf+7+EQV97ARPMhhVgU1ra2GhA==" + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -15337,6 +15343,25 @@ "node": ">=8.10.0" } }, + "node_modules/recoil": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/recoil/-/recoil-0.7.7.tgz", + "integrity": "sha512-8Og5KPQW9LwC577Vc7Ug2P0vQshkv1y3zG3tSSkWMqkWSwHmE+by06L8JtnGocjW6gcCvfwB3YtrJG6/tWivNQ==", + "dependencies": { + "hamt_plus": "1.0.2" + }, + "peerDependencies": { + "react": ">=16.13.1" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, "node_modules/recursive-readdir": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", diff --git a/package.json b/package.json index 90de419..cc84f8a 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", + "recoil": "^0.7.7", "sass": "^1.70.0", "typescript": "^4.9.5" }, diff --git a/src/App.scss b/src/App.scss index 0386a36..4ebb6d3 100644 --- a/src/App.scss +++ b/src/App.scss @@ -4,6 +4,17 @@ justify-content: center; align-items: center; gap: 20px; - width: 100%; - height: 100%; + + & > .stats { + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + gap: 15px; + width: 100%; + + & > .logo { + width: 75px; + } + } } diff --git a/src/App.tsx b/src/App.tsx index 2e93215..f3b2992 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,33 @@ -import './App.scss'; +// --------------------------------------------------------------------------------------------------------------------- +//! Imports +// --------------------------------------------------------------------------------------------------------------------- + +// ----------------------------------------------------- Context ------------------------------------------------------- +import { RecoilRoot } from 'recoil'; +// --------------------------------------------------------------------------------------------------------------------- + +// --------------------------------------------------- Components ------------------------------------------------------ import Grid from './components/Grid/Grid'; -import Timer from './components/Timer/Timer'; +import Timer from './components/Stats/Timer/Timer'; +import MinesCounter from './components/Stats/MinesCounter/MinesCounter'; +// --------------------------------------------------------------------------------------------------------------------- + +// ----------------------------------------------------- Styles -------------------------------------------------------- +import './App.scss'; +import Logo from './assets/logo'; +// --------------------------------------------------------------------------------------------------------------------- const App = () => { return (
+ {placedFlags} / {bombs} +
+{displayedTime}