From 2971219d91ba506622e096c1eda8e5ca7229a995 Mon Sep 17 00:00:00 2001
From: mpblocky <185767042+mpblocky@users.noreply.github.com>
Date: Mon, 3 Mar 2025 10:37:49 +0100
Subject: [PATCH] fix: remove unnecessary cancel button definition
---
.../components/choose-sign-up-account-type.tsx | 3 ---
.../src/modules/homepage/views/home.page.tsx | 15 +--------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/packages/apps/human-app/frontend/src/modules/homepage/components/choose-sign-up-account-type.tsx b/packages/apps/human-app/frontend/src/modules/homepage/components/choose-sign-up-account-type.tsx
index 0beae077f8..a0c2415e16 100644
--- a/packages/apps/human-app/frontend/src/modules/homepage/components/choose-sign-up-account-type.tsx
+++ b/packages/apps/human-app/frontend/src/modules/homepage/components/choose-sign-up-account-type.tsx
@@ -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';
@@ -14,7 +13,6 @@ interface ChooseSignUpAccountType {
export function ChooseSignUpAccountType() {
const { setPageView } = useHomePageState();
const { t } = useTranslation();
- const isMobileMd = useIsMobile('md');
const backToWelcomeStage = () => {
setPageView('welcome');
@@ -25,7 +23,6 @@ export function ChooseSignUpAccountType() {
backNavigation={backToWelcomeStage}
cancelNavigation={backToWelcomeStage}
childrenMaxWidth="876px"
- showCancelButton={isMobileMd}
maxContentWidth="748px"
title={{t('homepage.welcome')} 👋}
>
diff --git a/packages/apps/human-app/frontend/src/modules/homepage/views/home.page.tsx b/packages/apps/human-app/frontend/src/modules/homepage/views/home.page.tsx
index 23b26d0e2b..29d03570d6 100644
--- a/packages/apps/human-app/frontend/src/modules/homepage/views/home.page.tsx
+++ b/packages/apps/human-app/frontend/src/modules/homepage/views/home.page.tsx
@@ -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';
@@ -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();
@@ -54,16 +51,6 @@ export function HomePage() {
}}
>
- {pageView === 'chooseSignUpAccountType' && !isMobileMd ? (
-
- ) : null}
);