Skip to content

Commit

Permalink
fix: remove unnecessary cancel button definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mpblocky committed Mar 3, 2025
1 parent 0e5378f commit 2971219
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useIsMobile } from '@/shared/hooks/use-is-mobile';
import { PageCard } from '@/shared/components/ui/page-card';
import type { HomePageStageType } from '@/modules/homepage/views/home.page';
import { useHomePageState } from '@/shared/contexts/homepage-state';
Expand All @@ -14,7 +13,6 @@ interface ChooseSignUpAccountType {
export function ChooseSignUpAccountType() {
const { setPageView } = useHomePageState();
const { t } = useTranslation();
const isMobileMd = useIsMobile('md');

const backToWelcomeStage = () => {
setPageView('welcome');
Expand All @@ -25,7 +23,6 @@ export function ChooseSignUpAccountType() {
backNavigation={backToWelcomeStage}
cancelNavigation={backToWelcomeStage}
childrenMaxWidth="876px"
showCancelButton={isMobileMd}
maxContentWidth="748px"
title={<Typography variant="h4">{t('homepage.welcome')} 👋</Typography>}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import Box from '@mui/material/Box';
import { Paper } from '@mui/material';
import { Navigate } from 'react-router-dom';
import { t } from 'i18next';
import { useIsMobile } from '@/shared/hooks/use-is-mobile';
import { useWeb3Auth } from '@/modules/auth-web3/hooks/use-web3-auth';
import { useAuth } from '@/modules/auth/hooks/use-auth';
import { routerPaths } from '@/router/router-paths';
import { Button } from '@/shared/components/ui/button';
import { useColorMode } from '@/shared/contexts/color-mode';
import { HomeContainer } from '@/modules/homepage/components';
import { useHomePageState } from '@/shared/contexts/homepage-state';
Expand All @@ -15,9 +13,8 @@ export type HomePageStageType = 'welcome' | 'chooseSignUpAccountType';

export function HomePage() {
const { colorPalette, isDarkMode } = useColorMode();
const { pageView, setPageView } = useHomePageState();
const { pageView } = useHomePageState();
const isMobile = useIsMobile();
const isMobileMd = useIsMobile('md');
const { user: worker } = useAuth();
const { user: operator } = useWeb3Auth();

Expand Down Expand Up @@ -54,16 +51,6 @@ export function HomePage() {
}}
>
<HomeContainer />
{pageView === 'chooseSignUpAccountType' && !isMobileMd ? (
<Button
onClick={() => {
setPageView('welcome');
}}
sx={{ position: 'absolute', top: '24px', right: '24px' }}
>
{t('homepage.cancel')}
</Button>
) : null}
</Paper>
</Box>
);
Expand Down

0 comments on commit 2971219

Please sign in to comment.