From 344f5e9b0d06f565bce872602904d88ad149cde5 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 21 Dec 2020 17:58:46 +0100 Subject: [PATCH] Updated Result component so that it has the text centered by default --- src/servers/CreateServer.tsx | 2 +- src/short-urls/helpers/DeleteShortUrlModal.tsx | 4 ++-- src/short-urls/helpers/EditMetaModal.tsx | 2 +- src/short-urls/helpers/EditShortUrlModal.tsx | 2 +- src/short-urls/helpers/EditTagsModal.tsx | 2 +- src/tags/helpers/DeleteTagConfirmModal.tsx | 2 +- src/tags/helpers/EditTagModal.tsx | 2 +- src/utils/Result.tsx | 6 ++---- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/servers/CreateServer.tsx b/src/servers/CreateServer.tsx index a04ccba8..d98d3619 100644 --- a/src/servers/CreateServer.tsx +++ b/src/servers/CreateServer.tsx @@ -16,7 +16,7 @@ interface CreateServerProps extends RouterProps { } const ImportResult = ({ type }: { type: 'error' | 'success' }) => ( - + {type === 'success' && 'Servers properly imported. You can now select one from the list :)'} {type === 'error' && 'The servers could not be imported. Make sure the format is correct.'} diff --git a/src/short-urls/helpers/DeleteShortUrlModal.tsx b/src/short-urls/helpers/DeleteShortUrlModal.tsx index 8e4c9f21..35f99cf4 100644 --- a/src/short-urls/helpers/DeleteShortUrlModal.tsx +++ b/src/short-urls/helpers/DeleteShortUrlModal.tsx @@ -54,13 +54,13 @@ const DeleteShortUrlModal = ( /> {hasThresholdError && ( - + {errorData?.threshold && `This short URL has received more than ${errorData.threshold} visits, and therefore, it cannot be deleted.`} {!errorData?.threshold && 'This short URL has received too many visits, and therefore, it cannot be deleted.'} )} {hasErrorOtherThanThreshold && ( - + Something went wrong while deleting the URL :( )} diff --git a/src/short-urls/helpers/EditMetaModal.tsx b/src/short-urls/helpers/EditMetaModal.tsx index 8f1ac31c..ca22c2a1 100644 --- a/src/short-urls/helpers/EditMetaModal.tsx +++ b/src/short-urls/helpers/EditMetaModal.tsx @@ -79,7 +79,7 @@ const EditMetaModal = ( /> {error && ( - + Something went wrong while saving the metadata :( )} diff --git a/src/short-urls/helpers/EditShortUrlModal.tsx b/src/short-urls/helpers/EditShortUrlModal.tsx index 92428f4c..1a24d640 100644 --- a/src/short-urls/helpers/EditShortUrlModal.tsx +++ b/src/short-urls/helpers/EditShortUrlModal.tsx @@ -35,7 +35,7 @@ const EditShortUrlModal = ({ isOpen, toggle, shortUrl, shortUrlEdition, editShor /> {error && ( - + Something went wrong while saving the long URL :( )} diff --git a/src/short-urls/helpers/EditTagsModal.tsx b/src/short-urls/helpers/EditTagsModal.tsx index af1909d6..a41a4b98 100644 --- a/src/short-urls/helpers/EditTagsModal.tsx +++ b/src/short-urls/helpers/EditTagsModal.tsx @@ -33,7 +33,7 @@ const EditTagsModal = (TagsSelector: FC) => ( {shortUrlTags.error && ( - + Something went wrong while saving the tags :( )} diff --git a/src/tags/helpers/DeleteTagConfirmModal.tsx b/src/tags/helpers/DeleteTagConfirmModal.tsx index 0afc9fb7..eb95cd55 100644 --- a/src/tags/helpers/DeleteTagConfirmModal.tsx +++ b/src/tags/helpers/DeleteTagConfirmModal.tsx @@ -26,7 +26,7 @@ const DeleteTagConfirmModal = ( Are you sure you want to delete tag {tag}? {tagDelete.error && ( - + Something went wrong while deleting the tag :( )} diff --git a/src/tags/helpers/EditTagModal.tsx b/src/tags/helpers/EditTagModal.tsx index 26acc0c7..5779520b 100644 --- a/src/tags/helpers/EditTagModal.tsx +++ b/src/tags/helpers/EditTagModal.tsx @@ -56,7 +56,7 @@ const EditTagModal = ({ getColorForKey }: ColorGenerator) => ( {tagEdit.error && ( - + Something went wrong while editing the tag :( )} diff --git a/src/utils/Result.tsx b/src/utils/Result.tsx index da3da6b4..a381fd21 100644 --- a/src/utils/Result.tsx +++ b/src/utils/Result.tsx @@ -6,20 +6,18 @@ import { SimpleCard } from './SimpleCard'; interface ResultProps { type: 'success' | 'error' | 'warning'; className?: string; - textCentered?: boolean; small?: boolean; } -export const Result: FC = ({ children, type, className, textCentered = false, small = false }) => ( +export const Result: FC = ({ children, type, className, small = false }) => (