Skip to content

Commit bf6ff51

Browse files
authored
Merge pull request #3301 from humanprotocol/develop
Release 2025-04-27
2 parents c110bd8 + 59bfbe4 commit bf6ff51

File tree

16 files changed

+50
-62
lines changed

16 files changed

+50
-62
lines changed

packages/apps/human-app/frontend/src/modules/homepage/views/home.page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ export function HomePage() {
2727

2828
const paperBackgroundColor = (() => {
2929
if (isDarkMode) {
30-
if (isMobile) {
31-
return colorPalette.backgroundColor;
32-
}
3330
return colorPalette.paper.main;
3431
}
3532

36-
return colorPalette.white;
33+
return colorPalette.backgroundColor;
3734
})();
3835

3936
return (

packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-process.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1+
import { useEffect } from 'react';
12
import {
23
PageCardError,
34
PageCardLoader,
45
} from '@/shared/components/ui/page-card';
56
import { getErrorMessageForError } from '@/shared/errors';
6-
import { useVerifyEmailQuery } from '../hooks';
7+
import { useVerifyEmailMutation } from '../hooks';
78
import { EmailVerificationSuccessMessage } from './email-verification-success-message';
89

910
interface EmailVerificationProcessProps {
1011
token: string;
1112
}
1213

13-
function useEmailVerification(token: string) {
14-
const { error, isError, isPending } = useVerifyEmailQuery({ token });
15-
16-
return {
14+
export function EmailVerificationProcess({
15+
token,
16+
}: Readonly<EmailVerificationProcessProps>) {
17+
const {
1718
error,
1819
isError,
1920
isPending,
20-
};
21-
}
21+
mutate: verifyEmailMutation,
22+
} = useVerifyEmailMutation({ token });
2223

23-
export function EmailVerificationProcess({
24-
token,
25-
}: Readonly<EmailVerificationProcessProps>) {
26-
const { error, isError, isPending } = useEmailVerification(token);
24+
useEffect(() => {
25+
verifyEmailMutation();
26+
}, [token, verifyEmailMutation]);
2727

2828
if (isError) {
2929
return <PageCardError errorMessage={getErrorMessageForError(error)} />;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './use-email-verification-query';
1+
export * from './use-email-verification-mutation';
22
export * from './use-email-verification-token';
33
export * from './use-resend-email';
44
export * from './use-resend-email-router-params';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { z } from 'zod';
2+
import { useMutation } from '@tanstack/react-query';
3+
import * as emailVerificationService from '../services/email-verification.service';
4+
5+
export const verifyEmailDtoSchema = z.object({
6+
token: z.string(),
7+
});
8+
9+
export const VerifyEmailSuccessResponseSchema = z.unknown();
10+
11+
export function useVerifyEmailMutation({ token }: { token: string }) {
12+
return useMutation({
13+
mutationFn: () => emailVerificationService.verifyEmail(token),
14+
});
15+
}

packages/apps/human-app/frontend/src/modules/worker/email-verification/hooks/use-email-verification-query.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/apps/human-app/frontend/src/modules/worker/email-verification/services/email-verification.service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ const apiPaths = {
77

88
async function verifyEmail(token: string) {
99
try {
10-
await authorizedHumanAppApiClient.get(
11-
`${apiPaths.verifyEmail}?token=${token}`
12-
);
10+
await authorizedHumanAppApiClient.post(apiPaths.verifyEmail, {
11+
body: {
12+
token,
13+
},
14+
});
1315
} catch (error) {
1416
if (error instanceof ApiClientError) {
1517
throw error;

packages/apps/human-app/frontend/src/modules/worker/jobs-discovery/components/oracles-table-item-mobile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function OraclesTableItemMobile({
3131
const { selectOracle } = useSelectOracleNavigation();
3232

3333
return (
34-
<Paper sx={{ ...styles, backgroundColor: colorPalette.white }}>
34+
<Paper sx={{ ...styles, backgroundColor: colorPalette.backgroundColor }}>
3535
<Grid item>
3636
<ListItem label={t('worker.oraclesTable.oracleAddress')}>
3737
<EvmAddress address={oracle.address} />

packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/available-jobs-filter-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function AvailableJobsFilterModal({
3737
px: '50px',
3838
width: '100vw',
3939
zIndex: '9999999',
40-
background: colorPalette.white,
40+
background: colorPalette.backgroundColor,
4141
},
4242
}}
4343
variant="persistent"
@@ -51,7 +51,7 @@ export function AvailableJobsFilterModal({
5151
position: 'absolute',
5252
left: '0',
5353
top: '0',
54-
background: colorPalette.white,
54+
background: colorPalette.backgroundColor,
5555
display: 'flex',
5656
width: '100%',
5757
px: '44px',
@@ -68,7 +68,7 @@ export function AvailableJobsFilterModal({
6868
sx={{
6969
zIndex: '99999999',
7070
marginRight: '15px',
71-
backgroundColor: colorPalette.white,
71+
backgroundColor: colorPalette.backgroundColor,
7272
}}
7373
>
7474
<CloseIcon />

packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/desktop/status-chip.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Box from '@mui/material/Box';
22
import Typography from '@mui/material/Typography';
3-
import { colorPalette as lightModeColorPalette } from '@/shared/styles/color-palette';
43
import { useColorMode } from '@/shared/contexts/color-mode';
54
import { getChipStatusColor } from '../../utils';
65
import { type MyJob } from '../../../schemas';
@@ -15,12 +14,12 @@ export function StatusChip({ status }: Readonly<{ status: MyJob['status'] }>) {
1514
justifyContent: 'center',
1615
alignItems: 'center',
1716
padding: '6px 9px',
18-
color: lightModeColorPalette.white,
17+
color: colorPalette.white,
1918
backgroundColor: getChipStatusColor(status, colorPalette),
2019
borderRadius: '16px',
2120
}}
2221
>
23-
<Typography color={lightModeColorPalette.white} variant="chip">
22+
<Typography color={colorPalette.white} variant="chip">
2423
{status}
2524
</Typography>
2625
</Box>

packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-filter-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function MyJobsFilterModal({
3737
px: '50px',
3838
width: '100vw',
3939
zIndex: '9999999',
40-
background: colorPalette.white,
40+
background: colorPalette.backgroundColor,
4141
},
4242
}}
4343
variant="persistent"
@@ -51,7 +51,7 @@ export function MyJobsFilterModal({
5151
position: 'absolute',
5252
left: '0',
5353
top: '0',
54-
background: colorPalette.white,
54+
background: colorPalette.backgroundColor,
5555
display: 'flex',
5656
width: '100%',
5757
px: '44px',
@@ -73,7 +73,7 @@ export function MyJobsFilterModal({
7373
sx={{
7474
zIndex: '99999999',
7575
marginRight: '15px',
76-
backgroundColor: colorPalette.white,
76+
backgroundColor: colorPalette.backgroundColor,
7777
}}
7878
>
7979
<CloseIcon />

0 commit comments

Comments
 (0)