From 0b98185e2e742fbdfc4ea4377e493150475d9de2 Mon Sep 17 00:00:00 2001 From: gintil Date: Sun, 19 Jan 2025 16:41:33 -0500 Subject: [PATCH] Fix more google translate crashes isLoading will cause crashes if the body content is not wrapped in span. the nodes must always exist throughout the button lifecycle --- .../src/features/feed/components/AddFilterDialog/index.tsx | 2 +- .../features/feed/components/AddUserFeedDialog/index.tsx | 2 +- .../CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx | 2 +- .../src/features/feed/components/UserFeedsTable/index.tsx | 2 +- .../components/CloneDiscordConnectionCloneDialog/index.tsx | 2 +- .../ComparisonsTabSection/AddComparisonSelect.tsx | 2 +- .../components/ComparisonsTabSection/index.tsx | 2 +- .../AddFeedComanagerDialog/index.tsx | 2 +- services/backend-api/client/src/pages/FeedClone.tsx | 2 +- services/backend-api/client/src/pages/UserSettings.tsx | 7 ++++--- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/services/backend-api/client/src/features/feed/components/AddFilterDialog/index.tsx b/services/backend-api/client/src/features/feed/components/AddFilterDialog/index.tsx index 8a739230a..ef0e80dcb 100644 --- a/services/backend-api/client/src/features/feed/components/AddFilterDialog/index.tsx +++ b/services/backend-api/client/src/features/feed/components/AddFilterDialog/index.tsx @@ -64,7 +64,7 @@ export const AddFilterDialog: React.FC = ({ onSubmit }) => { return ( <> diff --git a/services/backend-api/client/src/features/feed/components/AddUserFeedDialog/index.tsx b/services/backend-api/client/src/features/feed/components/AddUserFeedDialog/index.tsx index 792f83172..b2129e9a1 100644 --- a/services/backend-api/client/src/features/feed/components/AddUserFeedDialog/index.tsx +++ b/services/backend-api/client/src/features/feed/components/AddUserFeedDialog/index.tsx @@ -132,7 +132,7 @@ export const AddUserFeedDialog = ({ trigger }: Props) => { isLoading={isLoading} variant="solid" > - {t("features.userFeeds.components.addUserFeedDialog.addButton")} + {t("features.userFeeds.components.addUserFeedDialog.addButton")} )} diff --git a/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx b/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx index 928c23f46..2bd2d7df8 100644 --- a/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx +++ b/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx @@ -97,7 +97,7 @@ export const SelectableUserFeedList = ({ selectedIds, onSelectedIdsChange }: Pro size="sm" width="full" > - Load more + Load more diff --git a/services/backend-api/client/src/features/feed/components/UserFeedsTable/index.tsx b/services/backend-api/client/src/features/feed/components/UserFeedsTable/index.tsx index 51a110da8..6fdff3b67 100644 --- a/services/backend-api/client/src/features/feed/components/UserFeedsTable/index.tsx +++ b/services/backend-api/client/src/features/feed/components/UserFeedsTable/index.tsx @@ -752,7 +752,7 @@ export const UserFeedsTable: React.FC = ({ onSelectedFeedId }) => { onClick={() => fetchNextPage()} mb={20} > - Load More + Load More diff --git a/services/backend-api/client/src/features/feedConnections/components/CloneDiscordConnectionCloneDialog/index.tsx b/services/backend-api/client/src/features/feedConnections/components/CloneDiscordConnectionCloneDialog/index.tsx index 9ffa53e96..af5c774af 100644 --- a/services/backend-api/client/src/features/feedConnections/components/CloneDiscordConnectionCloneDialog/index.tsx +++ b/services/backend-api/client/src/features/feedConnections/components/CloneDiscordConnectionCloneDialog/index.tsx @@ -138,7 +138,7 @@ export const CloneDiscordConnectionCloneDialog = ({ Cancel diff --git a/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/AddComparisonSelect.tsx b/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/AddComparisonSelect.tsx index 4fb9066db..ba848bdb7 100644 --- a/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/AddComparisonSelect.tsx +++ b/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/AddComparisonSelect.tsx @@ -57,7 +57,7 @@ export const AddComparisonSelect = ({ minW={32} isLoading={isAdding || isLoading} > - Add + Add diff --git a/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/index.tsx b/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/index.tsx index d791e343e..6e6b34956 100644 --- a/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/index.tsx +++ b/services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/index.tsx @@ -323,7 +323,7 @@ export const ComparisonsTabSection = ({ isDisabled={userFeedArticlesFetchStatus === "fetching"} size="sm" > - Select article to preview + Select article to preview } feedId={feedId} diff --git a/services/backend-api/client/src/features/feedConnections/components/UserFeedSettingsTabSection/AddFeedComanagerDialog/index.tsx b/services/backend-api/client/src/features/feedConnections/components/UserFeedSettingsTabSection/AddFeedComanagerDialog/index.tsx index 2836fe8ae..8fef46472 100644 --- a/services/backend-api/client/src/features/feedConnections/components/UserFeedSettingsTabSection/AddFeedComanagerDialog/index.tsx +++ b/services/backend-api/client/src/features/feedConnections/components/UserFeedSettingsTabSection/AddFeedComanagerDialog/index.tsx @@ -246,7 +246,7 @@ export const AddFeedComanagerDialog = ({ isDisabled={!selectedMention || !checkedConnections.length || saving} isLoading={saving} > - {okButtonText || t("common.buttons.save")} + {okButtonText || t("common.buttons.save")} diff --git a/services/backend-api/client/src/pages/FeedClone.tsx b/services/backend-api/client/src/pages/FeedClone.tsx index a7af3f7ee..fbedd866d 100644 --- a/services/backend-api/client/src/pages/FeedClone.tsx +++ b/services/backend-api/client/src/pages/FeedClone.tsx @@ -169,7 +169,7 @@ const FeedClone: React.FC = () => { isDisabled={!selectedFeedId || !properties.length || loadingFeeds || saving} colorScheme="blue" > - {t("pages.cloneFeed.cloneButtonLabel")} + {t("pages.cloneFeed.cloneButtonLabel")} diff --git a/services/backend-api/client/src/pages/UserSettings.tsx b/services/backend-api/client/src/pages/UserSettings.tsx index 0de42cc43..808d3e46e 100644 --- a/services/backend-api/client/src/pages/UserSettings.tsx +++ b/services/backend-api/client/src/pages/UserSettings.tsx @@ -140,8 +140,9 @@ const ChangePaymentMethodUrlButton = () => { isDisabled={!!error} colorScheme={error ? "red" : undefined} > - {!error && Change Payment Method} - {error && Failed to load change payment method button} + + {error ? "Failed to load change payment method button" : "Change Payment Method"} + ); @@ -574,7 +575,7 @@ export const UserSettings = () => { onClickRemoveRedditLogin(); }} > - Disconnect + Disconnect )}