Skip to content

Commit

Permalink
feat: add component loader fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
RasenGUY committed Jan 28, 2024
1 parent 4152b7b commit 11f0ef6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/ButtonForJoinableGame/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ButtonForJoinableGame = ({ gameType, gameId, gameUuid }: ButtonForJ
buttonType="secondary"
className="flex items-center"
onClick={openConnectModal}
>
>
Join
<StarLoaderIcon className="dark:fill-blanc h-[16px] w-[16px] ms-[5px]" />
</Button> : !isGamePlayable ? <Link to={`/join/${gameType.toLowerCase()}/${gameUuid}`} state={{ gameUuid, gameId }}>
Expand Down
3 changes: 2 additions & 1 deletion src/containers/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { localeSelector } from '../LanguageProvider/intlSlice';
import { useAppSelector, useMediaQuery } from '../../hooks';
import { RouterProvider } from 'react-router-dom';
import router, { mobileRouter } from '../Router';
import { ComponentLoader } from '../../common/loaders';
import 'twin.macro';


Expand All @@ -14,7 +15,7 @@ function App() {
return (
<LanguageProvider locale={locale}>
<HelmetProvider>
<RouterProvider router={!windowIsCurrentlyMobile ? router : mobileRouter} fallbackElement={<p>Loading...</p>} />
<RouterProvider router={!windowIsCurrentlyMobile ? router : mobileRouter} fallbackElement={<ComponentLoader tw="w-[100vw] h-[100vh] flex justify-center items-center"/>} />
</HelmetProvider>
</LanguageProvider>
)
Expand Down
2 changes: 1 addition & 1 deletion src/containers/FooterMobile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const FooterMobile = () => {
<Link to="https://wega-1.gitbook.io/wega-lite-paper/" target="_blank">
<NormalText>Documentation</NormalText>
</Link>
<Link to="https://app.wega.fun" target="_blank">
<Link to="https://app.wega.fun/#/" target="_blank">
<NormalText tw="text-transparent dark:bg-gradient-to-r from-oranjo-blanc to-oranjo bg-clip-text">Play Beta(Web only)</NormalText>
</Link>
</div>
Expand Down

0 comments on commit 11f0ef6

Please sign in to comment.