From fb916be941de022159027ccf47728ab89f7c883f Mon Sep 17 00:00:00 2001 From: Fluffy9 Date: Thu, 30 May 2024 21:31:29 +0000 Subject: [PATCH 1/4] Routes seem to work despite error messages... --- packages/client/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/client/package.json b/packages/client/package.json index 2fd27c06e..05e78ca4f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -27,10 +27,12 @@ "@latticexyz/world": "2.0.11", "@rainbow-me/rainbowkit": "^2.1.1", "@tanstack/react-query": "^5.37.1", + "@types/react-router-dom": "^5.3.3", "contracts": "workspace:*", "framer-motion": "^11.2.6", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.23.1", "rxjs": "7.5.5", "viem": "2.9.20", "wagmi": "^2.9.6" From ebf5b21098e443fabdfb3e62c79d3eeb1cf312e0 Mon Sep 17 00:00:00 2001 From: Fluffy9 Date: Thu, 30 May 2024 21:32:07 +0000 Subject: [PATCH 2/4] Routes --- packages/client/src/App.tsx | 12 ++++-- packages/client/src/Routes.tsx | 19 ++++++++++ .../src/components/CharacterCreation.tsx | 38 +++++++++++++++++++ packages/client/src/components/Header.tsx | 36 ++++++++++++++++++ packages/client/src/components/World.tsx | 38 +++++++++++++++++++ 5 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 packages/client/src/Routes.tsx create mode 100644 packages/client/src/components/CharacterCreation.tsx create mode 100644 packages/client/src/components/Header.tsx create mode 100644 packages/client/src/components/World.tsx diff --git a/packages/client/src/App.tsx b/packages/client/src/App.tsx index 2faaf5455..427eccb1e 100644 --- a/packages/client/src/App.tsx +++ b/packages/client/src/App.tsx @@ -1,5 +1,11 @@ -import { Welcome } from './components/Welcome'; +import AppRoutes from './Routes'; -export const App = (): JSX.Element => { - return ; +export const App: React.FC = () => { + return ( +
+ +
+ ); }; + +export default App; diff --git a/packages/client/src/Routes.tsx b/packages/client/src/Routes.tsx new file mode 100644 index 000000000..3b8620c29 --- /dev/null +++ b/packages/client/src/Routes.tsx @@ -0,0 +1,19 @@ +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; + +import { CharacterCreation } from './components/CharacterCreation'; +import { Welcome } from './components/Welcome'; +import { World } from './components/World'; + +const AppRoutes: React.FC = () => { + return ( + + + } /> + } /> + } /> + + + ); +}; + +export default AppRoutes; diff --git a/packages/client/src/components/CharacterCreation.tsx b/packages/client/src/components/CharacterCreation.tsx new file mode 100644 index 000000000..1f9ee432a --- /dev/null +++ b/packages/client/src/components/CharacterCreation.tsx @@ -0,0 +1,38 @@ +import { Container, Heading, Text, VStack } from '@chakra-ui/react'; + +export const CharacterCreation = (): JSX.Element => { + return ( + + + + Character Creation + + + + As you awaken, your eyes flutter open to the stark, eerie ambiance + of a dimly lit cave. Confusion clouds your mind; the cold, hard + ground beneath you offers no comfort. Glimpses of blood and bruises + on your body only deepen the mystery, painting a silent story of + unseen struggles. + + + Where are you? How did you end up here? + + + The shadows around you hold secrets, whispering tales of survival + and discovery. Gathering your strength, you rise, the weight of + uncertainty heavy on your shoulders yet igniting a spark of + determination within. With a deep breath, you take your first step + into the unknown, embarking on a journey where every choice carves + your path through the darkness. + + + + + ); +}; diff --git a/packages/client/src/components/Header.tsx b/packages/client/src/components/Header.tsx new file mode 100644 index 000000000..35df143b8 --- /dev/null +++ b/packages/client/src/components/Header.tsx @@ -0,0 +1,36 @@ +import { + Box, + Button, + Heading, + Menu, + MenuButton, + MenuItem, + MenuList, + useDisclosure, +} from '@chakra-ui/react'; + +import { ConnectWalletModal } from './ConnectWalletModal'; + +export const Header = (): JSX.Element => { + const { isOpen, onOpen, onClose } = useDisclosure(); + + return ( + + + + + Ultimate Dominion + + + + + + + + + + + ); +}; diff --git a/packages/client/src/components/World.tsx b/packages/client/src/components/World.tsx new file mode 100644 index 000000000..929a6d473 --- /dev/null +++ b/packages/client/src/components/World.tsx @@ -0,0 +1,38 @@ +import { Container, Heading, Text, VStack } from '@chakra-ui/react'; + +export const World = (): JSX.Element => { + return ( + + + + World + + + + As you awaken, your eyes flutter open to the stark, eerie ambiance + of a dimly lit cave. Confusion clouds your mind; the cold, hard + ground beneath you offers no comfort. Glimpses of blood and bruises + on your body only deepen the mystery, painting a silent story of + unseen struggles. + + + Where are you? How did you end up here? + + + The shadows around you hold secrets, whispering tales of survival + and discovery. Gathering your strength, you rise, the weight of + uncertainty heavy on your shoulders yet igniting a spark of + determination within. With a deep breath, you take your first step + into the unknown, embarking on a journey where every choice carves + your path through the darkness. + + + + + ); +}; From 19afe55bf91cd93c3d0a2d3269c79a07f9478413 Mon Sep 17 00:00:00 2001 From: Fluffy9 Date: Fri, 31 May 2024 19:03:52 +0000 Subject: [PATCH 3/4] Added some routes, character creation page --- packages/client/src/Routes.tsx | 6 +- .../src/components/CharacterCreation.tsx | 123 +++++++++++++----- packages/client/src/components/Header.tsx | 36 ----- packages/client/src/components/World.tsx | 35 +---- 4 files changed, 96 insertions(+), 104 deletions(-) delete mode 100644 packages/client/src/components/Header.tsx diff --git a/packages/client/src/Routes.tsx b/packages/client/src/Routes.tsx index 3b8620c29..bde4a0eca 100644 --- a/packages/client/src/Routes.tsx +++ b/packages/client/src/Routes.tsx @@ -8,9 +8,9 @@ const AppRoutes: React.FC = () => { return ( - } /> - } /> - } /> + } /> + } /> + } /> ); diff --git a/packages/client/src/components/CharacterCreation.tsx b/packages/client/src/components/CharacterCreation.tsx index 1f9ee432a..aa5baf93f 100644 --- a/packages/client/src/components/CharacterCreation.tsx +++ b/packages/client/src/components/CharacterCreation.tsx @@ -1,38 +1,95 @@ -import { Container, Heading, Text, VStack } from '@chakra-ui/react'; +import { + Avatar, + Box, + Button, + ButtonGroup, + Card, + CardBody, + Center, + Container, + Flex, + Heading, + Input, + Link, + Stack, + Text, + Textarea, + VStack, +} from '@chakra-ui/react'; export const CharacterCreation = (): JSX.Element => { return ( - - - - Character Creation - - - - As you awaken, your eyes flutter open to the stark, eerie ambiance - of a dimly lit cave. Confusion clouds your mind; the cold, hard - ground beneath you offers no comfort. Glimpses of blood and bruises - on your body only deepen the mystery, painting a silent story of - unseen struggles. - - - Where are you? How did you end up here? - - - The shadows around you hold secrets, whispering tales of survival - and discovery. Gathering your strength, you rise, the weight of - uncertainty heavy on your shoulders yet igniting a spark of - determination within. With a deep breath, you take your first step - into the unknown, embarking on a journey where every choice carves - your path through the darkness. - - - - + + + + + +
+ +
+ + + + + + +
+
+ + +