i always deploy my projects on github pages, but this time for some reason it's not working properly. It only shows up the Navbar. I think it have to do with how i'm using react router. My app.tsx looks like this
<ChakraProvider>
<Router>
<Navbar />
<Routes>
{isAuth ? (
<>
<Route path="/profile" element={<Profile />} />
<Route path="/user-chats" element={<UserChats />} />
<Route path="/chat" element={<ChatPage />} />
<Route path="/new-group" element={<NewGroup />} />
<Route path="/group-chat" element={<GroupChat />} />
<Route path="/group-config" element={<GroupConfig />} />
<Route path="/friends" element={<FriendList />} />
<Route path="/add-friend" element={<AddFriend />} />
</>
) : (
<>
<Route path="/" element={<Login />} />
<Route path="/create-account" element={<CreateAccount />} />
<Route path="/phone-account" element={<PhoneAccount />} />
</>
)}
</Routes>
{isAuth && <BottomNav />}
</Router>
</ChakraProvider>
isAuth it's a state for it's authenticaded or not. If it's false then it will render the login page. In my package.json i added the homepage as
"homepage": "https://JosephKorel.github.io/FlyChat"
And at the scripts:
"predeploy":"npm run build",
"deploy":"gh-pages -d build"
Here is the website url https://josephkorel.github.io/FlyChat/ And here is the repo https://github.com/JosephKorel/FlyChat