Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suisin/chore: update content in passkey-config #42

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,18 @@ type TGetModalContent = {
export const NOT_SUPPORTED_ERROR_NAME = 'NotSupportedError';

export const getModalContent = ({ error, is_passkey_registration_started }: TGetModalContent) => {
const error_message_header = (error as TServerError)?.name === NOT_SUPPORTED_ERROR_NAME && (
<Localize i18n_default_text='Passkey Creation Unsupported' />
);
const error_message =
(error as TServerError)?.name === NOT_SUPPORTED_ERROR_NAME ? (
<Localize i18n_default_text='Passkey isn’t supported on this device.' />
<Localize i18n_default_text='Passkey creation is not available on your device. We apologize for any inconvenience this may cause.' />
) : (
(error as TServerError)?.message
);
const button_text =
(error as TServerError)?.name === NOT_SUPPORTED_ERROR_NAME ? (
<Localize i18n_default_text='Continue trading' />
<Localize i18n_default_text='OK' />
) : (
<Localize i18n_default_text='Try again' />
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need Try again button @suisin-deriv

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, because there might be other errors

Expand Down Expand Up @@ -157,6 +160,7 @@ export const getModalContent = ({ error, is_passkey_registration_started }: TGet
}

return {
header: error_message_header,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header?
new requirement to design?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the title of error is different according to requirements

description: error_message ?? '',
button_text: error ? button_text : undefined,
};
Expand Down
Loading