diff --git a/packages/apps/human-app/frontend/src/api/auth-service.ts b/packages/apps/human-app/frontend/src/api/auth-service.ts
index f54a1a49c5..967ca6c662 100644
--- a/packages/apps/human-app/frontend/src/api/auth-service.ts
+++ b/packages/apps/human-app/frontend/src/api/auth-service.ts
@@ -1,5 +1,5 @@
import { jwtDecode } from 'jwt-decode';
-import { type SignInDto } from '@/modules/signin/worker/schemas';
+import { type SignInDto } from '@/modules/signin/schemas';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import {
type AuthTokensSuccessResponse,
diff --git a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts
index 92a427d161..4907c45090 100644
--- a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts
+++ b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts
@@ -6,7 +6,7 @@ import {
} from './http-api-client';
import { AuthService, type AuthProvider } from './auth-service';
-export class AuthorizedHttpApiClient extends HttpApiClient {
+class AuthorizedHttpApiClient extends HttpApiClient {
constructor(
baseUrl: string,
private readonly authProvider: AuthProvider
diff --git a/packages/apps/human-app/frontend/src/assets/background-images/signin-background-mobile.png b/packages/apps/human-app/frontend/src/assets/background-images/signin-background-mobile.png
deleted file mode 100644
index 6fff015e74..0000000000
Binary files a/packages/apps/human-app/frontend/src/assets/background-images/signin-background-mobile.png and /dev/null differ
diff --git a/packages/apps/human-app/frontend/src/assets/background-images/signup-background-mobile.png b/packages/apps/human-app/frontend/src/assets/background-images/signup-background-mobile.png
deleted file mode 100644
index 3400ddfe29..0000000000
Binary files a/packages/apps/human-app/frontend/src/assets/background-images/signup-background-mobile.png and /dev/null differ
diff --git a/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx b/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx
index 41df7be2d3..0cb61239d2 100644
--- a/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx
+++ b/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx
@@ -1,6 +1,7 @@
import { z } from 'zod';
+
import { createAuthProvider } from '@/shared/contexts/generic-auth-context';
-import { KycStatus } from '@/modules/worker/profile/types';
+import { KycStatus } from '@/shared/types/entity.type';
const userDataSchema = z.object({
site_key: z.string().optional().nullable(),
diff --git a/packages/apps/human-app/frontend/src/modules/governance-banner/components/governance-banner.tsx b/packages/apps/human-app/frontend/src/modules/governance-banner/components/governance-banner.tsx
index 6128ff6366..42df0df4fb 100644
--- a/packages/apps/human-app/frontend/src/modules/governance-banner/components/governance-banner.tsx
+++ b/packages/apps/human-app/frontend/src/modules/governance-banner/components/governance-banner.tsx
@@ -1,9 +1,9 @@
-import AccessTimeIcon from '@mui/icons-material/AccessTime';
-import { Box, Grid, Link as MuiLink, Typography } from '@mui/material';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
+import AccessTimeIcon from '@mui/icons-material/AccessTime';
+import { Box, Grid, Link as MuiLink, Typography } from '@mui/material';
+
import { env } from '@/shared/env';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { useProposalQuery } from '../hooks/use-proposal-query';
import { formatCountdown } from '../../../shared/utils/time';
import { type ProposalResponse } from '../services/governance.service';
@@ -20,8 +20,6 @@ function getProposalStatus(proposal: ProposalResponse): ProposalStatus {
export function GovernanceBanner() {
const { t } = useTranslation();
const { data: proposal, isLoading, isError } = useProposalQuery();
- const { colorPalette } = useColorMode();
- const { text, background } = colorPalette.banner;
const [timeRemaining, setTimeRemaining] = useState('00:00:00');
useEffect(() => {
@@ -55,8 +53,8 @@ export function GovernanceBanner() {
sx={{
alignItems: { xs: 'flex-start', sm: 'center' },
justifyContent: { xs: 'flex-start', sm: 'space-between' },
- bgcolor: background.primary,
- color: text.secondary,
+ bgcolor: 'primary.main',
+ color: 'common.white',
borderRadius: '8px',
p: 2,
gap: 2,
@@ -75,13 +73,13 @@ export function GovernanceBanner() {
>
-
+
{status === 'pending'
? t('governance.timeToStart', 'Voting starts in')
: t('governance.timeToReveal', 'Time to reveal vote')}
:
-
+
{timeRemaining}
@@ -90,8 +88,8 @@ export function GovernanceBanner() {
variant="body1"
sx={{
ml: { xs: 0, md: 8 },
- color: text.primary,
- bgcolor: background.secondary,
+ color: 'text.primary',
+ bgcolor: 'background.paper',
borderRadius: '8px',
p: '4px 8px',
}}
@@ -113,9 +111,9 @@ export function GovernanceBanner() {
href={env.VITE_GOVERNANCE_URL}
target="_blank"
rel="noopener noreferrer"
+ variant="body1"
sx={{
- color: text.secondary,
- fontWeight: 500,
+ color: 'common.white',
textDecoration: 'none',
'&:hover': {
textDecoration: 'underline',
diff --git a/packages/apps/human-app/frontend/src/modules/homepage/components/logo-section.tsx b/packages/apps/human-app/frontend/src/modules/homepage/components/logo-section.tsx
index 0c7089ebba..efe5f8e5f8 100644
--- a/packages/apps/human-app/frontend/src/modules/homepage/components/logo-section.tsx
+++ b/packages/apps/human-app/frontend/src/modules/homepage/components/logo-section.tsx
@@ -1,43 +1,40 @@
-import { Grid, Stack, Typography } from '@mui/material';
+import { Stack, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
export function LogoSection() {
const { t } = useTranslation();
- const logoText: string = t('homepage.humanApp');
- const logoTextSplit: string[] = logoText.split(' ');
+
+ const logoText = t('homepage.humanApp');
+ const logoTextSplit = logoText.split(' ');
return (
-
- {logoTextSplit[0]}
-
- {logoTextSplit[1]}
+
+ {logoTextSplit[0]}
+
+ {logoTextSplit[1]}
+
-
+
{t('homepage.completeJobs')}
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx b/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx
index 09b30c6cbb..dc39b438bb 100644
--- a/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx
+++ b/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx
@@ -1,27 +1,27 @@
-import { Paper, Button } from '@mui/material';
import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
-import { useColorMode } from '@/shared/contexts/color-mode';
+import { Paper, Button, Typography } from '@mui/material';
+
import { routerPaths } from '@/router/router-paths';
export function SignInSection() {
- const { colorPalette } = useColorMode();
const { t } = useTranslation();
return (
-
+ */}
+
+ {t('homepage.signUpClosed')}
+
);
}
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 c85d49d090..2127687527 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,14 +1,14 @@
import { Box, Container, Grid, Paper } from '@mui/material';
import { Navigate } from 'react-router-dom';
-import { routerPaths } from '@/router/router-paths';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { LogoSection } from '../components/logo-section';
import { SignInSection } from '../components/sign-in-section';
+import { routerPaths } from '@/router/router-paths';
+import { useColorMode } from '@/shared/contexts/color-mode';
import { useIsUserVerified } from '@/shared/hooks';
export function HomePage() {
- const { colorPalette } = useColorMode();
+ const { isDarkMode } = useColorMode();
const isUserVerified = useIsUserVerified();
if (isUserVerified) {
@@ -22,7 +22,7 @@ export function HomePage() {
sx={{
position: 'relative',
mx: { xs: 0, md: 4 },
- bgcolor: colorPalette.backgroundColor,
+ bgcolor: isDarkMode ? 'background.default' : 'common.white',
}}
>
@@ -31,7 +31,10 @@ export function HomePage() {
spacing={{ xs: 0, lg: 10 }}
sx={{ width: '100%', alignItems: 'center', pb: { xs: 5, lg: 0 } }}
>
-
+
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx
similarity index 63%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx
rename to packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx
index 181d9e9192..3f6621465f 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx
+++ b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx
@@ -1,6 +1,6 @@
import { type SubmitEvent } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
-import { Box, Divider, Grid, Link as MuiLink, Typography } from '@mui/material';
+import { Box, Grid, Link as MuiLink } from '@mui/material';
import { zodResolver } from '@hookform/resolvers/zod';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
@@ -8,12 +8,10 @@ import { Link } from 'react-router-dom';
import { Input } from '@/shared/components/data-entry/input';
import { Button } from '@/shared/components/ui/button';
import { Password } from '@/shared/components/data-entry/password';
-import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors';
import { HCaptchaForm } from '@/shared/components/hcaptcha';
import { routerPaths } from '@/router/router-paths';
-
-import { type SignInDto, signInDtoSchema } from './schemas';
+import { type SignInDto, signInDtoSchema } from '../schemas';
interface SignInFormProps {
onSubmit: (data: SignInDto) => void;
@@ -29,7 +27,6 @@ export function SignInForm({
resetMutation,
}: SignInFormProps) {
const { t } = useTranslation();
- const { colorPalette } = useColorMode();
const methods = useForm({
defaultValues: {
@@ -50,30 +47,23 @@ export function SignInForm({
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts
similarity index 92%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts
rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts
index cf75008640..ee2ea03125 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts
+++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts
@@ -2,7 +2,7 @@ import { useMutation } from '@tanstack/react-query';
import { env } from '@/shared/env';
import { AuthService, HttpApiClient } from '@/api';
import { useAuth } from '@/modules/auth/hooks/use-auth';
-import { type SignInDto } from './schemas';
+import { type SignInDto } from '../schemas';
function signInMutationFn(data: SignInDto) {
const httpClient = new HttpApiClient(env.VITE_API_URL);
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx
similarity index 94%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx
rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx
index 477abd65c1..16698fbed9 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx
+++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx
@@ -1,7 +1,8 @@
import { useEffect } from 'react';
+
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import { useSignInMutation } from './use-sign-in-mutation';
-import { type SignInDto } from './schemas';
+import { type SignInDto } from '../schemas';
export function useSignIn() {
const {
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts b/packages/apps/human-app/frontend/src/modules/signin/schemas.ts
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts
rename to packages/apps/human-app/frontend/src/modules/signin/schemas.ts
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx
similarity index 79%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx
rename to packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx
index ea0b529ba9..179db6ec7e 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx
+++ b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx
@@ -1,29 +1,29 @@
import { useEffect } from 'react';
import { t } from 'i18next';
import { useNavigate } from 'react-router-dom';
-import { Box, Grid, Paper, Typography } from '@mui/material';
+import { Box, Grid, Typography } from '@mui/material';
+
import { getErrorMessageForError } from '@/shared/errors';
import { ApiClientError } from '@/api';
-import { useSignIn } from './use-sign-in';
-import { SignInForm } from './sign-in-form';
-
+import { useSignIn } from './hooks/use-sign-in';
+import { SignInForm } from './components/sign-in-form';
import signInImage from '@/assets/background-images/signin-background.png';
import {
TopNotificationType,
useNotification,
} from '@/shared/hooks/use-notification';
import { BackButton } from '@/shared/components/ui/page-card/back-button';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { useAuth } from '@/modules/auth/hooks/use-auth';
import { routerPaths } from '@/router/router-paths';
import { useIsUserVerified } from '@/shared/hooks';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
+import { PageCard } from '@/shared/components/ui/page-card';
function formattedSignInErrorMessage(
unknownError: unknown
): string | undefined {
if (unknownError instanceof ApiClientError && unknownError.status === 401) {
- return t('worker.signInForm.errors.invalidCredentials');
+ return t('signInForm.errors.invalidCredentials');
}
}
@@ -31,7 +31,6 @@ export function SignInPage() {
const { showNotification } = useNotification();
const navigate = useNavigate();
const { user, status, signOut } = useAuth();
- const { colorPalette } = useColorMode();
const isUserVerified = useIsUserVerified();
const { signIn, error, isError, isLoading, reset } = useSignIn();
@@ -79,25 +78,10 @@ export function SignInPage() {
};
return (
-
- {t('worker.signInForm.title')}
+ {t('signInForm.title')}
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts
deleted file mode 100644
index 33eedcbea5..0000000000
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './sign-in.page';
-export * from './verify-user.page';
diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts
rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts
diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx
rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx
diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts b/packages/apps/human-app/frontend/src/modules/signup/schema.ts
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts
rename to packages/apps/human-app/frontend/src/modules/signup/schema.ts
diff --git a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts
index f410015543..8910e4afb4 100644
--- a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts
+++ b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts
@@ -1,5 +1,5 @@
import { ApiClientError, humanAppApiClient } from '@/api';
-import { type SignUpDto } from '../worker/schema';
+import { type SignUpDto } from '../schema';
const signUpPath = '/auth/signup';
diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx
similarity index 69%
rename from packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx
rename to packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx
index bb8dd28edd..3d4e73c02a 100644
--- a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx
+++ b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx
@@ -1,10 +1,11 @@
-import { useEffect } from 'react';
+import { useEffect, type SubmitEvent } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
import { Link as RouterLink, useNavigate } from 'react-router-dom';
import { zodResolver } from '@hookform/resolvers/zod';
-import { Box, Divider, Grid, Link, Paper, Typography } from '@mui/material';
+import { Box, Divider, Grid, Link, Typography } from '@mui/material';
import { Trans } from 'react-i18next';
import { t } from 'i18next';
+
import { Button } from '@/shared/components/ui/button';
import { Input } from '@/shared/components/data-entry/input';
import { Password } from '@/shared/components/data-entry/password';
@@ -12,30 +13,32 @@ import { env } from '@/shared/env';
import { getErrorMessageForError } from '@/shared/errors';
import { HCaptchaForm } from '@/shared/components/hcaptcha';
import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors';
-import { useSignUpWorker } from '@/modules/signup/worker/hooks/use-sign-up-worker';
+import { useSignUpWorker } from './hooks/use-sign-up-worker';
import { ApiClientError } from '@/api';
-import { signUpDtoSchema } from '../schema';
+import { signUpDtoSchema } from './schema';
import signUpImage from '@/assets/background-images/signup-background.png';
import { BackButton } from '@/shared/components/ui/page-card/back-button';
-
import { routerPaths } from '@/router/router-paths';
import {
TopNotificationType,
useNotification,
} from '@/shared/hooks/use-notification';
+import { PageCard } from '@/shared/components/ui/page-card';
import { useColorMode } from '@/shared/contexts/color-mode';
function handleSignupError(unknownError: unknown) {
if (unknownError instanceof ApiClientError && unknownError.status === 409) {
- return t('worker.signUpForm.errors.emailTaken');
+ return t('signUpForm.errors.emailTaken');
}
}
export function SignUpPage() {
const { showNotification } = useNotification();
const navigate = useNavigate();
- const { colorPalette } = useColorMode();
+ const { isDarkMode } = useColorMode();
+
const { signUp, error, isError, isLoading, reset } = useSignUpWorker();
+
const methods = useForm({
defaultValues: {
email: '',
@@ -62,29 +65,12 @@ export function SignUpPage() {
navigate(-1);
};
- const handleSubmit = (event: React.FormEvent) => {
+ const handleSubmit = (event: SubmitEvent) => {
void methods.handleSubmit(signUp)(event);
};
return (
-
+
- {t('worker.signUpForm.title')}
+ {t('signUpForm.title')}
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts
deleted file mode 100644
index 3c0e3dddf5..0000000000
--- a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './views/sign-up-worker.page';
diff --git a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts
index 7666fcd23d..8f79e50d7e 100644
--- a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts
+++ b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts
@@ -5,14 +5,13 @@
// function
import { ChainId } from '@human-protocol/sdk/src/enums';
import { NETWORKS } from '@human-protocol/sdk/src/constants';
-import { env } from '@/shared/env';
import {
MainnetContracts,
TestnetContracts,
type ContractsAddresses,
} from '@/modules/smart-contracts/contracts';
-export interface Chain {
+interface Chain {
explorerUrl: string;
name: string;
chainId: number;
@@ -23,22 +22,22 @@ export type ChainWithAddresses = Chain & {
addresses: ContractsAddresses;
};
-export const TestnetChainsIds = [
+const TestnetChainsIds = [
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.BSC_TESTNET,
ChainId.LOCALHOST,
] as const;
-export const MainnetChainsIds = [
+const MainnetChainsIds = [
ChainId.POLYGON,
ChainId.MAINNET,
ChainId.BSC_MAINNET,
ChainId.ALL,
] as const;
-export type TestnetNarrow = Exclude;
-export type MainnetNarrow = Exclude;
+type TestnetNarrow = Exclude;
+type MainnetNarrow = Exclude;
export const TestnetChains: readonly ChainWithAddresses[] = [
{
@@ -87,28 +86,3 @@ function getChainConfigsForChainIds(
}
return result;
}
-
-const handleFilterChains = (
- chainsArr: ChainWithAddresses[],
- chainIdsEnabled: number[]
-) => {
- return chainsArr.filter((chain) =>
- chainIdsEnabled.some((el) => el === chain.chainId)
- );
-};
-
-export const getTestnetChainsEnabled = (chainIdsEnabled: number[]) => {
- return handleFilterChains(AllTestnetsChains, chainIdsEnabled);
-};
-
-export const getMainnetChainsEnabled = (chainIdsEnabled: number[]) => {
- return handleFilterChains(AllMainnetChains, chainIdsEnabled);
-};
-
-export const getEnabledChainsByUiConfig = (
- chainIdsEnabled: number[]
-): Chain[] =>
- (env.VITE_NETWORK === 'mainnet'
- ? getMainnetChainsEnabled(chainIdsEnabled)
- : getTestnetChainsEnabled(chainIdsEnabled)
- ).map(({ addresses: _, ...chainData }) => chainData);
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx
similarity index 76%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx
index cbbb106d4c..6558d1eafb 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx
@@ -3,9 +3,8 @@ import { useTranslation, Trans } from 'react-i18next';
import { Box, keyframes, Link, Stack, Typography } from '@mui/material';
import { jwtDecode } from 'jwt-decode';
-import { useStartIdv } from '../hooks';
-import { KycStatus } from '../types';
-import { useColorMode } from '@/shared/contexts/color-mode';
+import { useStartIdv } from '../hooks/use-start-idv';
+import { KycStatus } from '@/shared/types/entity.type';
import { env } from '@/shared/env';
import { HourglassIcon, VeriffIcon } from '@/shared/components/ui/icons';
import { Button } from '@/shared/components/ui/button';
@@ -13,6 +12,7 @@ import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import { UserData } from '@/modules/auth/context/auth-context';
import { useAuth } from '@/modules/auth/hooks/use-auth';
+import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
const hourglassSpin = keyframes`
0% {
@@ -29,8 +29,7 @@ const hourglassSpin = keyframes`
}
`;
-// TODO: Extend to 30 seconds
-const CHECK_STATUS_COOLDOWN_TIME = 10000;
+const CHECK_STATUS_COOLDOWN_TIME = 30000;
export function IdentityVerificationControl({
kycStatus,
@@ -45,6 +44,8 @@ export function IdentityVerificationControl({
const cooldownTimerRef = useRef(null);
const { t } = useTranslation();
+ const { isDarkMode } = useColorMode();
+
const { isIdvAlreadyInProgress, idvStarted, idvStartIsPending, startIdv } =
useStartIdv();
const {
@@ -52,7 +53,6 @@ export function IdentityVerificationControl({
isPending: isRefreshingAccessToken,
} = useAccessTokenRefresh();
const { updateUserData } = useAuth();
- const { colorPalette } = useColorMode();
const handleCheckVerificationStatus = useCallback(async () => {
if (isRefreshingAccessToken || isCheckStatusCoolingDown) {
@@ -107,13 +107,13 @@ export function IdentityVerificationControl({
return (
,
}}
- i18nKey="worker.profile.verificationDeclined"
+ i18nKey="verifyUser.verificationDeclined"
/>
);
@@ -131,24 +131,20 @@ export function IdentityVerificationControl({
p: 2.5,
borderRadius: '10px',
border: '1px solid',
- borderColor: colorPalette.border.main,
+ borderColor: 'border.main',
}}
>
-
- {t('worker.profile.verificationOpenedInNewTab')}
+
+ {t('verifyUser.verificationOpenedInNewTab')}
- {t('worker.profile.completeYourVerification')}
+ {t('verifyUser.completeYourVerification')}
- {t('worker.profile.waitingForVerification')}
+ {t('verifyUser.waitingForVerification')}
@@ -180,7 +175,7 @@ export function IdentityVerificationControl({
loading={isRefreshingAccessToken}
onClick={handleCheckVerificationStatus}
>
- {t('worker.profile.checkVerificationStatus')}
+ {t('verifyUser.checkVerificationStatus')}
>
@@ -190,10 +185,10 @@ export function IdentityVerificationControl({
return (
- {t('worker.profile.veriffCopy')}
+ {t('verifyUser.veriffCopy')}
- {t('worker.profile.poweredBy')}
+ {t('verifyUser.poweredBy')}
@@ -224,7 +214,7 @@ export function IdentityVerificationControl({
loading={idvStartIsPending}
onClick={startIdv}
>
- {t('worker.profile.completeIdentityVerification')}
+ {t('verifyUser.completeIdentityVerification')}
);
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/buttons/register-address-btn.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx
similarity index 66%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/components/buttons/register-address-btn.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx
index 21973a3fd7..2479ece814 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/buttons/register-address-btn.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx
@@ -1,7 +1,8 @@
import { t } from 'i18next';
+
import { Button } from '@/shared/components/ui/button';
-import { useRegisterAddress } from '@/modules/worker/hooks/use-register-address';
-import { useRegisterAddressNotifications } from '@/modules/worker/hooks/use-register-address-notifications';
+import { useRegisterAddress } from '../hooks/use-register-address';
+import { useRegisterAddressNotifications } from '../hooks/use-register-address-notifications';
export function RegisterAddressBtn() {
const { onSuccess, onError } = useRegisterAddressNotifications();
@@ -18,7 +19,7 @@ export function RegisterAddressBtn() {
loading={isPending}
onClick={mutate.bind(undefined, undefined)}
>
- {t('worker.profile.registerAddress')}
+ {t('verifyUser.registerAddress')}
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx
similarity index 64%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx
index 64a4034535..29fc8b94ce 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx
@@ -1,14 +1,10 @@
import { useCallback, useState } from 'react';
-import { Box, Stack, Typography } from '@mui/material';
+import { Box, Chip, Stack, Typography } from '@mui/material';
import { t } from 'i18next';
-import { Chip } from '@/shared/components/ui/chip';
-import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
-import {
- IdentityVerificationControl,
- WalletConnectionControl,
-} from '@/modules/worker/profile/components';
-import { KycStatus } from '@/modules/worker/profile/types/profile-types';
+import { IdentityVerificationControl } from './identity-verification-control';
+import { WalletConnectionControl } from './wallet-connection-control';
+import { KycStatus } from '@/shared/types/entity.type';
import { useIsMobile } from '@/shared/hooks';
import { useAuth } from '@/modules/auth/hooks/use-auth';
@@ -35,14 +31,11 @@ export function VerificationFlow({
);
const { user } = useAuth();
- const { colorPalette } = useColorMode();
const isMobile = useIsMobile();
const kycStatus = user?.kyc_status as KycStatus;
- const label = kycStatus
- ? t(`worker.profile.idvStatusValues.${kycStatus}`)
- : '';
+ const label = kycStatus ? t(`verifyUser.idvStatusValues.${kycStatus}`) : '';
const isKycDeclined = kycStatus === KycStatus.DECLINED;
const isKycStarted = kycStatus !== KycStatus.NONE;
@@ -54,9 +47,9 @@ export function VerificationFlow({
- {t('worker.profile.beforeWeGetStarted')}
+ {t('verifyUser.beforeWeGetStarted')}
@@ -86,19 +76,25 @@ export function VerificationFlow({
<>
- {t('worker.profile.identityVerification')}
+ {t('verifyUser.identityVerification')}
{isKycStarted && label && (
-
+
)}
- {t('worker.profile.connectYourWallet')}
+ {t('verifyUser.connectYourWallet')}
>
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx
similarity index 70%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx
index 5f8cabf303..7affcb96d1 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx
@@ -1,16 +1,15 @@
import { useTranslation } from 'react-i18next';
import { Stack, Typography } from '@mui/material';
+
+import { RegisterAddressBtn } from './register-address-btn';
import { Button } from '@/shared/components/ui/button';
import { useWalletConnect } from '@/shared/contexts/wallet-connect';
-import { RegisterAddressBtn } from './buttons/register-address-btn';
import { useAuth } from '@/modules/auth/hooks/use-auth';
-import { useColorMode } from '@/shared/contexts/color-mode';
export function WalletConnectionControl() {
const { t } = useTranslation();
const { user } = useAuth();
const { isConnected, openModal } = useWalletConnect();
- const { colorPalette } = useColorMode();
const hasWalletAddress = !!user?.wallet_address;
@@ -18,8 +17,8 @@ export function WalletConnectionControl() {
return (
-
- {t('worker.profile.walletAddressMessage')}
+
+ {t('verifyUser.walletAddressMessage')}
);
@@ -32,7 +31,7 @@ export function WalletConnectionControl() {
fullWidth
onClick={() => void openModal()}
>
- {t('components.wallet.connectBtn.connect')}
+ {t('verifyUser.connectWallet')}
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address-notifications.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx
similarity index 92%
rename from packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address-notifications.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx
index 506e6e87c0..e1ba19f51a 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address-notifications.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx
@@ -12,7 +12,7 @@ export function useRegisterAddressNotifications() {
const onSuccess = () => {
showNotification({
type: TopNotificationType.SUCCESS,
- message: t('worker.registerAddress.success'),
+ message: t('verifyUser.registerAddressSuccess'),
});
};
const onError = (error: ResponseError) => {
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts
similarity index 93%
rename from packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address.ts
rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts
index bd1b5f8d5e..569d4295b6 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hooks/use-register-address.ts
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts
@@ -1,11 +1,12 @@
import { useMutation } from '@tanstack/react-query';
import { t } from 'i18next';
+
import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh';
import type { ResponseError } from '@/shared/types/global.type';
import { useWalletConnect } from '@/shared/contexts/wallet-connect';
import { usePrepareSignature } from '@/shared/hooks';
import { PrepareSignatureType } from '@/shared/services/signature.service';
-import * as profileService from '../profile/services/profile.service';
+import * as verifyUserService from '../services/verify-user.service';
import { useAuth } from '@/modules/auth/hooks/use-auth';
interface RegisterAddressCallbacks {
@@ -36,7 +37,7 @@ function useRegisterAddressMutation(callbacks: RegisterAddressCallbacks) {
// wallet address is part of the JWT payload
// so we need to refresh the token after the address is registered
- await profileService.registerAddress({ address, chainId, signature });
+ await verifyUserService.registerAddress({ address, chainId, signature });
await refreshAccessTokenAsync({});
updateUserData({
wallet_address: address,
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-start-idv-mutation.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts
similarity index 66%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-start-idv-mutation.ts
rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts
index c64cb15770..433d2596b0 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-start-idv-mutation.ts
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts
@@ -1,12 +1,13 @@
import { useMutation } from '@tanstack/react-query';
-import * as profileService from '../services/profile.service';
+
+import * as verifyUserService from '../services/verify-user.service';
import { useAuth } from '@/modules/auth/hooks/use-auth';
export function useIdvStartMutation() {
const { user } = useAuth();
return useMutation({
- mutationFn: async () => profileService.startIdv(),
+ mutationFn: async () => verifyUserService.startIdv(),
mutationKey: ['idvStart', user?.email],
});
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-start-idv.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-start-idv.ts
rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/services/profile.service.ts b/packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts
similarity index 100%
rename from packages/apps/human-app/frontend/src/modules/worker/profile/services/profile.service.ts
rename to packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts
diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx
similarity index 68%
rename from packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx
rename to packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx
index 3b293077d4..debb6a8b5c 100644
--- a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx
+++ b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx
@@ -1,19 +1,18 @@
import { useEffect } from 'react';
import { Navigate, useNavigate } from 'react-router-dom';
-import { Paper, Stack } from '@mui/material';
+import { Stack } from '@mui/material';
+import { VerificationFlow } from './components/verification-flow';
import { useAuth } from '@/modules/auth/hooks/use-auth';
-import { KycStatus } from '@/modules/worker/profile/types';
import { routerPaths } from '@/router/router-paths';
+import { KycStatus } from '@/shared/types/entity.type';
import { useIsUserVerified } from '@/shared/hooks';
-import { useColorMode } from '@/shared/contexts/color-mode';
-import { VerificationFlow } from './verification-flow';
import { Loader } from '@/shared/components/ui/loader';
+import { PageCard } from '@/shared/components/ui/page-card';
export function VerifyUserPage() {
const navigate = useNavigate();
const { user, status } = useAuth();
- const { colorPalette } = useColorMode();
const isUserVerified = useIsUserVerified();
const isEmailVerificationPending =
@@ -45,28 +44,13 @@ export function VerifyUserPage() {
}
return (
-
{isLoading ? (
@@ -84,6 +68,6 @@ export function VerifyUserPage() {
isKycApproved={user?.kyc_status === KycStatus.APPROVED}
/>
)}
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx
index eea5be3c4b..24dcda7b19 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx
@@ -2,30 +2,30 @@ import { useEffect } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import { FormProvider } from 'react-hook-form';
-import { Box, Paper, Stack, Typography } from '@mui/material';
+import { Box, Stack, Typography } from '@mui/material';
-import { PageCardLoader } from '@/shared/components/ui/page-card';
+import { PageCard, PageCardLoader } from '@/shared/components/ui/page-card';
import { getErrorMessageForError } from '@/shared/errors';
import {
TopNotificationType,
useNotification,
} from '@/shared/hooks/use-notification';
import { useResendEmailRouterParams, useResendEmail } from '../hooks';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { useAuth } from '@/modules/auth/hooks/use-auth';
import { routerPaths } from '@/router/router-paths';
import { InboxIcon } from '@/shared/components/ui/icons';
import { Button } from '@/shared/components/ui/button';
import { HCaptchaForm } from '@/shared/components/hcaptcha/h-captcha-form';
+import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
export function EmailVerificationFormContainer() {
const { email } = useResendEmailRouterParams() ?? {};
const { methods, handleResend, isError, error, isSuccess } = useResendEmail();
const { showNotification } = useNotification();
const { t } = useTranslation();
- const { colorPalette } = useColorMode();
const { user, signOut } = useAuth();
const navigate = useNavigate();
+ const { isDarkMode } = useColorMode();
useEffect(() => {
if (isError) {
@@ -55,27 +55,10 @@ export function EmailVerificationFormContainer() {
}
return (
-
@@ -85,30 +68,26 @@ export function EmailVerificationFormContainer() {
}}
>
-
+
{t('worker.verifyEmail.checkYourInbox')}
-
+
),
}}
@@ -119,11 +98,9 @@ export function EmailVerificationFormContainer() {
{t('worker.verifyEmail.paragraph2')}
@@ -137,7 +114,7 @@ export function EmailVerificationFormContainer() {
}}
>
{!!user && (
@@ -151,6 +128,6 @@ export function EmailVerificationFormContainer() {
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-success-message.tsx b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-success-message.tsx
index ccd9ec3eff..6609035a9c 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-success-message.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-success-message.tsx
@@ -1,45 +1,23 @@
import { t } from 'i18next';
import { Link } from 'react-router-dom';
-import { Paper, Stack, Typography } from '@mui/material';
+import { Stack, Typography } from '@mui/material';
import { Button } from '@/shared/components/ui/button';
import { SuccessIcon } from '@/shared/components/ui/icons';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { routerPaths } from '@/router/router-paths';
+import { PageCard } from '@/shared/components/ui/page-card';
export function EmailVerificationSuccessMessage() {
- const { colorPalette } = useColorMode();
return (
-
-
+
{t('worker.emailVerification.title')}
-
+
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/breadcrumbs.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/breadcrumbs.tsx
index 4c825db3bb..c56eca921b 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/breadcrumbs.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/breadcrumbs.tsx
@@ -3,11 +3,8 @@ import { Link as RouterLink } from 'react-router-dom';
import { t } from 'i18next';
import { routerPaths } from '@/router/router-paths';
-import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
export function Breadcrumbs() {
- const { colorPalette } = useColorMode();
-
return (
{t('worker.jobs.availableJobs')}
-
+
{'>'}
{t('worker.jobs.hCaptcha')}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx
index f198e6d185..8d053bb20f 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx
@@ -14,7 +14,6 @@ import {
useNotification,
} from '@/shared/hooks/use-notification';
import { getErrorMessageForError } from '@/shared/errors';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { useHCaptchaUserStats } from '../hooks';
import { UserStatsDetails } from './user-stats-details';
import { LoadingOverlay } from './user-stats-loading-overlay';
@@ -24,7 +23,6 @@ const ACCORDION_HEIGHT = '48px';
export function UserStatsAccordion() {
const [isExpanded, setIsExpanded] = useState(false);
- const { colorPalette } = useColorMode();
const { showNotification } = useNotification();
const {
@@ -77,13 +75,7 @@ export function UserStatsAccordion() {
isHcaptchaUserStatsRefetching ||
isHcaptchaUserStatsError
}
- expandIcon={
-
- }
+ expandIcon={}
id="panel1-header"
sx={{
width: ACCORDION_WIDTH,
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx
index 4bb9a0a58e..c9751ffdbd 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx
@@ -2,7 +2,6 @@ import { Divider, IconButton, Stack, Typography } from '@mui/material';
import { t } from 'i18next';
import { RefreshIcon } from '@/shared/components/ui/icons';
-import { useColorMode } from '@/shared/contexts/color-mode';
import { useIsMobile } from '@/shared/hooks';
import { type HCaptchaUserStatsSuccess } from '../types';
@@ -13,13 +12,12 @@ type Props = {
};
export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
- const { colorPalette } = useColorMode();
const isMobile = useIsMobile();
return (
{!isMobile && (
-
+
)}
@@ -34,7 +32,7 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
{t('worker.hcaptchaLabelingStats.jobsServed')}
-
+
{stats.served}
@@ -42,7 +40,7 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
{t('worker.hcaptchaLabelingStats.jobsComplete')}
-
+
{stats.solved}
@@ -50,12 +48,9 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
{t('worker.hcaptchaLabelingStats.hmtEarned')}
-
+
{stats.balance.total}{' '}
-
+
{t('inputMasks.humanCurrencySuffix')}
@@ -66,7 +61,7 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
sx={{
mt: { xs: 2, md: 3 },
mb: 2,
- bgcolor: colorPalette.border.strong,
+ bgcolor: 'border.strong',
}}
/>
@@ -77,12 +72,9 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
{t('worker.hcaptchaLabelingStats.earnedLastHour')}
-
+
{stats.balance.recent}{' '}
-
+
{t('inputMasks.humanCurrencySuffix')}
@@ -97,10 +89,7 @@ export function UserStatsDetails({ stats, refetch, isRefetching }: Props) {
gap: { xs: 1, md: 2 },
}}
>
-
+
{t('worker.hcaptchaLabelingStats.statisticsNotLive')}
`1px solid ${theme.palette.border.strong}`,
}}
>
diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/enable-labeler.page.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/enable-labeler.page.tsx
index b8315d7aa4..45e278c361 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/enable-labeler.page.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/enable-labeler.page.tsx
@@ -4,7 +4,6 @@ import { Box, Paper, Stack, Typography } from '@mui/material';
import { Button } from '@/shared/components/ui/button';
import { getErrorMessageForError } from '@/shared/errors';
-import { useColorMode } from '@/shared/contexts/color-mode/use-color-mode';
import {
TopNotificationType,
useNotification,
@@ -13,7 +12,6 @@ import { useEnableHCaptchaLabelingMutation } from './hooks';
import { Breadcrumbs } from './components/breadcrumbs';
export function EnableLabelerPage() {
- const { colorPalette } = useColorMode();
const { showNotification } = useNotification();
const { mutate, error, isError, isPending, reset } =
useEnableHCaptchaLabelingMutation();
@@ -38,10 +36,10 @@ export function EnableLabelerPage() {
width: '100%',
py: { xs: 2, md: 6 },
px: { xs: 2, md: 4 },
- borderBottom: {
+ borderBottom: (theme) => ({
xs: 'none',
- md: `1px solid ${colorPalette.border.main}`,
- },
+ md: `1px solid ${theme.palette.border.main}`,
+ }),
}}
>
@@ -61,12 +59,12 @@ export function EnableLabelerPage() {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
- bgcolor: { xs: 'transparent', md: colorPalette.background.subtle },
+ bgcolor: { xs: 'transparent', md: 'background.subtle' },
borderRadius: '20px',
- border: {
+ border: (theme) => ({
xs: 'none',
- md: `1px solid ${colorPalette.border.strong}`,
- },
+ md: `1px solid ${theme.palette.border.strong}`,
+ }),
}}
>
-
+
{t('worker.enableHCaptchaLabeling.description')}
- {isMobile &&
- renderDescription(colorPalette.text.auxiliary200, isMobile)}
+ {isMobile && renderDescription(isMobile)}