Skip to content

Commit 0b98185

Browse files
committed
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
1 parent c5dccd4 commit 0b98185

File tree

10 files changed

+13
-12
lines changed

10 files changed

+13
-12
lines changed

services/backend-api/client/src/features/feed/components/AddFilterDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const AddFilterDialog: React.FC<Props> = ({ onSubmit }) => {
6464
return (
6565
<>
6666
<Button colorScheme="blue" isDisabled={saving} isLoading={saving} onClick={onOpen}>
67-
{t("components.addFilterDialog.addButton")}
67+
<span>{t("components.addFilterDialog.addButton")}</span>
6868
</Button>
6969
<Modal isOpen={isOpen} onClose={onClose}>
7070
<ModalOverlay />

services/backend-api/client/src/features/feed/components/AddUserFeedDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const AddUserFeedDialog = ({ trigger }: Props) => {
132132
isLoading={isLoading}
133133
variant="solid"
134134
>
135-
{t("features.userFeeds.components.addUserFeedDialog.addButton")}
135+
<span>{t("features.userFeeds.components.addUserFeedDialog.addButton")}</span>
136136
</Button>
137137
)}
138138
</Tooltip>

services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/SelectableUserFeedList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const SelectableUserFeedList = ({ selectedIds, onSelectedIdsChange }: Pro
9797
size="sm"
9898
width="full"
9999
>
100-
Load more
100+
<span>Load more</span>
101101
</Button>
102102
</Flex>
103103
</Stack>

services/backend-api/client/src/features/feed/components/UserFeedsTable/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export const UserFeedsTable: React.FC<Props> = ({ onSelectedFeedId }) => {
752752
onClick={() => fetchNextPage()}
753753
mb={20}
754754
>
755-
Load More
755+
<span>Load More</span>
756756
</Button>
757757
</Stack>
758758
</Stack>

services/backend-api/client/src/features/feedConnections/components/CloneDiscordConnectionCloneDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export const CloneDiscordConnectionCloneDialog = ({
138138
Cancel
139139
</Button>
140140
<Button colorScheme="blue" type="submit" form="clonefeed" isLoading={isSubmitting}>
141-
Clone
141+
<span>Clone</span>
142142
</Button>
143143
</HStack>
144144
</ModalFooter>

services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/AddComparisonSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const AddComparisonSelect = ({
5757
minW={32}
5858
isLoading={isAdding || isLoading}
5959
>
60-
Add
60+
<span>Add</span>
6161
</Button>
6262
</Stack>
6363
</Box>

services/backend-api/client/src/features/feedConnections/components/ComparisonsTabSection/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export const ComparisonsTabSection = ({
323323
isDisabled={userFeedArticlesFetchStatus === "fetching"}
324324
size="sm"
325325
>
326-
Select article to preview
326+
<span>Select article to preview</span>
327327
</Button>
328328
}
329329
feedId={feedId}

services/backend-api/client/src/features/feedConnections/components/UserFeedSettingsTabSection/AddFeedComanagerDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export const AddFeedComanagerDialog = ({
246246
isDisabled={!selectedMention || !checkedConnections.length || saving}
247247
isLoading={saving}
248248
>
249-
{okButtonText || t("common.buttons.save")}
249+
<span>{okButtonText || t("common.buttons.save")}</span>
250250
</Button>
251251
</HStack>
252252
</ModalFooter>

services/backend-api/client/src/pages/FeedClone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const FeedClone: React.FC = () => {
169169
isDisabled={!selectedFeedId || !properties.length || loadingFeeds || saving}
170170
colorScheme="blue"
171171
>
172-
{t("pages.cloneFeed.cloneButtonLabel")}
172+
<span>{t("pages.cloneFeed.cloneButtonLabel")}</span>
173173
</Button>
174174
</HStack>
175175
</Stack>

services/backend-api/client/src/pages/UserSettings.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ const ChangePaymentMethodUrlButton = () => {
140140
isDisabled={!!error}
141141
colorScheme={error ? "red" : undefined}
142142
>
143-
{!error && <span>Change Payment Method</span>}
144-
{error && <span>Failed to load change payment method button</span>}
143+
<span>
144+
{error ? "Failed to load change payment method button" : "Change Payment Method"}
145+
</span>
145146
</Button>
146147
</Box>
147148
);
@@ -574,7 +575,7 @@ export const UserSettings = () => {
574575
onClickRemoveRedditLogin();
575576
}}
576577
>
577-
Disconnect
578+
<span>Disconnect</span>
578579
</Button>
579580
)}
580581
</HStack>

0 commit comments

Comments
 (0)