diff --git a/public/icon.png b/public/icon.png index 1a03acd..86b0aa7 100644 Binary files a/public/icon.png and b/public/icon.png differ diff --git a/src/main.tsx b/src/main.tsx index 25cc992..72f1de4 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -5,7 +5,7 @@ import { RouterProvider, createHashRouter, redirect } from 'react-router-dom'; import App from './App'; import { Game, JoinGame } from './modules/game'; -import { Home, Rules } from './modules/home'; +import { About, Home, Rules } from './modules/home'; import './index.css'; @@ -22,7 +22,7 @@ const router = createHashRouter([ path: 'rules', element: ( - {(account, provider) => } + {() => } ), }, @@ -48,6 +48,14 @@ const router = createHashRouter([ ), }, + { + path: 'about', + element: ( + + {() => } + + ), + }, ]); ReactDOM.createRoot(document.getElementById('root')!).render(); diff --git a/src/modules/home/components/About/About.css b/src/modules/home/components/About/About.css new file mode 100644 index 0000000..a478210 --- /dev/null +++ b/src/modules/home/components/About/About.css @@ -0,0 +1,7 @@ +.About__list dt { + font-weight: bold; +} +.About__list dd { + margin-left: 0; + margin-bottom: 15px; +} diff --git a/src/modules/home/components/About/About.tsx b/src/modules/home/components/About/About.tsx new file mode 100644 index 0000000..4174f02 --- /dev/null +++ b/src/modules/home/components/About/About.tsx @@ -0,0 +1,39 @@ +import { Back, Subtitle, Title } from '../../../common-ui'; + +import './About.css'; + +export const About = () => { + return ( +
+ + About +

+ Cipher Bomb is a blockchain game crafted using{' '} + + the fhEVM + + . Developed in Solidity, Cipher Bomb leverages the encrypted types provided by the fhEVM to secure player cards + and utilizes the encrypted PRNG to distribute cards to each player on-chain. For a deeper understanding, you can + explore{' '} + + the contract's source code + + . +

+ + Credits +
+
Contract & dapp
+
+ immortal tofu +
+
Graphics
+
+ Brice Eljeji +
+
Music
+
Eternal Lupin
+
+
+ ); +}; diff --git a/src/modules/home/components/About/index.ts b/src/modules/home/components/About/index.ts new file mode 100644 index 0000000..da0f79e --- /dev/null +++ b/src/modules/home/components/About/index.ts @@ -0,0 +1 @@ +export * from './About'; diff --git a/src/modules/home/components/Home/Home.css b/src/modules/home/components/Home/Home.css index 2398c31..a3759ee 100644 --- a/src/modules/home/components/Home/Home.css +++ b/src/modules/home/components/Home/Home.css @@ -9,14 +9,18 @@ } .Home__link { + display: flex; + align-items: center; +} + +.Home__link a, +.Home__link span { font-family: Bungee; font-size: 32px; color: #fff; text-shadow: -5px 5px 0 #000; text-decoration: none; cursor: pointer; - display: flex; - align-items: center; } .Home__link .lds-ripple { @@ -24,11 +28,22 @@ margin-left: 15px; } -.Home__link:hover { +.Home__link a:hover, +.Home__link span:hover { color: var(--primary-color); } -.Home__link--disabled { - color: #444; +.Home__link--disabled a, +.Home__link--disabled span { + color: #444 !important; pointer-events: none; } + +.Home__link--small { + margin-top: 30px; +} + +.Home__link--small a { + color: var(--fifth-color); + font-size: 1.4em; +} diff --git a/src/modules/home/components/Home/Home.tsx b/src/modules/home/components/Home/Home.tsx index fe56102..608c88f 100644 --- a/src/modules/home/components/Home/Home.tsx +++ b/src/modules/home/components/Home/Home.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { BrowserProvider, ContractFactory } from 'ethers'; -import { useEffect, useState } from 'react'; +import { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import cipherbomb from '../../../../abi/cipherbomb.json'; @@ -26,25 +26,24 @@ export const Home = ({ account, provider }: HomeProps) => { const address = await c.getAddress(); navigate(`/game/${address}`); }; + return (
Cipher Bomb
Welcome, {account}
-
- - Create a room {createLoading && } - +
+ Create a room + {createLoading && } +
+
+ Join a room
-
- - Join a room - +
+ Rules
-
- - Rules - +
+ About
diff --git a/src/modules/home/components/Rules/Rules.tsx b/src/modules/home/components/Rules/Rules.tsx index eeaeb19..96e3a78 100644 --- a/src/modules/home/components/Rules/Rules.tsx +++ b/src/modules/home/components/Rules/Rules.tsx @@ -1,13 +1,6 @@ -import { BrowserProvider } from 'ethers'; - import { Back, Subtitle, Title } from '../../../common-ui'; -type RulesProps = { - account: string; - provider: BrowserProvider; -}; - -export const Rules = (_: RulesProps) => { +export const Rules = () => { return (
diff --git a/src/modules/home/index.ts b/src/modules/home/index.ts index 00b9cf2..8579aa3 100644 --- a/src/modules/home/index.ts +++ b/src/modules/home/index.ts @@ -1,2 +1,3 @@ export * from './components/Home'; export * from './components/Rules'; +export * from './components/About';