Skip to content

Commit

Permalink
feat(SPV-679): minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-4chain committed Apr 26, 2024
1 parent 7e6b0aa commit 89088e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContactAwaitingAcceptance, ContactConfirmed } from '@/api/types/contact';
import { ContactAwaitingAcceptance, ContactConfirmed, ContactNotConfirmed } from '@/api/types/contact';
import { Loader } from '@/components/Loader';
import {
LargeTd,
Expand Down Expand Up @@ -111,7 +111,7 @@ export const ContactsTable: FC = () => {
setJustAddedContact(false);
}}
>
{justAddedContact && contactForVerification.status === 'unconfirmed' && <JustAddedContactMsg />}
{justAddedContact && contactForVerification.status === ContactNotConfirmed && <JustAddedContactMsg />}
</VerifyModal>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { FC } from 'react';
import styled from '@emotion/styled';
import { colors } from '@/styles';
import { StatusBadge } from './StatusBadge';
import { ContactNotConfirmed } from '@/api';

export const JustAddedContactMsg: FC = () => {
return (
<Container>
<SuccessInfo>You've successfully accepted the contact.</SuccessInfo>
Until confirmed, it will be displayed as <StatusBadge status="unconfirmed" style={{ display: 'inline' }} />
Until confirmed, it will be displayed as{' '}
<StatusBadge status={ContactNotConfirmed} style={{ display: 'inline' }} />
<br />
You can confirm it right now or return to this process later by using the "Show code" button.
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ContactAddModal: FC<ContactAddModalProps> = ({ onSubmitted, onCance
<ContactUpsertModal
onCancel={onCancel}
onSubmitted={onSubmitted}
sucessMsg="Contact added successfully!"
successMsg="Contact added successfully!"
errorMsg="Error occurred while adding a contact."
modalTitle="Add contact"
modalSubtitle="Please double check the paymail address on which the invitation will be sent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const ContactEditModal: FC<ContactEditModalProps> = ({ onSubmitted, onCan
<ContactUpsertModal
onCancel={onCancel}
onSubmitted={onSubmitted}
sucessMsg="Contact edited successfully!"
successMsg="Contact edited successfully!"
errorMsg="Error occurred while editing a contact."
modalTitle="Edit contact"
modalSubtitle=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EMAIL_REGEX } from '@/utils/constants';
type ContactUpsertModal = {
onSubmitted: () => void;
onCancel: () => void;
sucessMsg: string;
successMsg: string;
errorMsg: string;
modalTitle: string;
modalSubtitle: string;
Expand All @@ -27,7 +27,7 @@ export const ContactUpsertModal: FC<ContactUpsertModal> = ({
onCancel,
fields,
errorMsg,
sucessMsg,
successMsg,
modalTitle,
modalSubtitle,
disabledPaymailInput,
Expand All @@ -38,7 +38,7 @@ export const ContactUpsertModal: FC<ContactUpsertModal> = ({
const { name, paymail, phone, setName, setPaymail, setPhone } = fields;

const onSuccess = async () => {
setSuccessMessage(sucessMsg);
setSuccessMessage(successMsg);
await modalCloseTimeout();
onSubmitted();
};
Expand Down

0 comments on commit 89088e7

Please sign in to comment.