|
1 | 1 | import React, { useEffect, useState } from 'react';
|
2 |
| -import clsx from 'clsx'; |
3 | 2 | import { useHistory } from 'react-router-dom';
|
| 3 | +import { twMerge } from 'tailwind-merge'; |
4 | 4 | import { useOnfido } from '@deriv/api';
|
5 |
| -import { qtMerge } from '@deriv/quill-design'; |
6 | 5 | import { Button, Loader, Text } from '@deriv-com/ui';
|
7 | 6 | import IcAccountMissingDetails from '../../assets/proof-of-identity/ic-account-missing-details.svg';
|
8 | 7 | import { ErrorMessage } from '../../components/ErrorMessage';
|
@@ -58,7 +57,7 @@ export const OnfidoContainer = ({
|
58 | 57 | const hasPersonalDetailsValidationError = ['MissingPersonalDetails', 'InvalidPostalCode'].includes(
|
59 | 58 | serviceTokenError?.error.code ?? ''
|
60 | 59 | );
|
61 |
| - const showErrorMessage = onfidoInitializationError?.message || serviceTokenError?.error?.message; |
| 60 | + const showErrorMessage = onfidoInitializationError?.message ?? serviceTokenError?.error?.message; |
62 | 61 |
|
63 | 62 | if (isServiceTokenLoading) {
|
64 | 63 | return <Loader />;
|
@@ -98,16 +97,17 @@ export const OnfidoContainer = ({
|
98 | 97 | }
|
99 | 98 |
|
100 | 99 | return (
|
101 |
| - <div className={qtMerge('flex flex-col items-center gap-800 p-800 lg:p-50')}> |
| 100 | + <div className={twMerge('flex flex-col items-center gap-16 p-16 lg:p-0')}> |
102 | 101 | <div
|
103 |
| - className={clsx( |
104 |
| - '[transition:transform_0.35s_ease,_opacity_0.35s_linear]origin-top opacity-1300 p-800', |
105 |
| - { '[display:none]': transitionEnd, 'scale-y-0 opacity-50': isOnfidoEnabled } |
| 102 | + className={twMerge( |
| 103 | + '[transition:transform_0.35s_ease,_opacity_0.35s_linear]origin-top opacity-24 p-16', |
| 104 | + transitionEnd && 'hidden', |
| 105 | + isOnfidoEnabled && 'scale-y-0 opacity-50' |
106 | 106 | )}
|
107 | 107 | >
|
108 |
| - {/* TODO: Dummy div here replace with PoiConfirmWithExample */} |
| 108 | + {/* Do this: Dummy div here replace with PoiConfirmWithExample */} |
109 | 109 | <div
|
110 |
| - className='border-75 border-solid border-solid-slate-300 rounded-500 w-[200px] sm:w-[638px] h-[384px]' |
| 110 | + className='border-1 border-solid border-solid-grey-2 rounded-lg w-[200px] sm:w-[638px] h-[384px]' |
111 | 111 | data-testid='dt_poi-confirm-with-example'
|
112 | 112 | onClick={() => setIsOnfidoEnabled(true)}
|
113 | 113 | onKeyDown={() => setIsOnfidoEnabled(true)}
|
|
0 commit comments