Skip to content

Commit bce95cd

Browse files
author
Alex
committed
fix: type narrowing in checkoutModeToSelectValue
1 parent 4127a9f commit bce95cd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

playgrounds/shared/src/components/settings/Settings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ const CHECKOUT_MODE_MAP: Record<string, CheckoutMode | undefined> = {
7272

7373
function checkoutModeToSelectValue(mode: CheckoutMode | undefined): string {
7474
if (mode === undefined) return 'api-default';
75-
if (typeof mode === 'object' && mode.mode === 'sequence-checkout')
76-
return 'sequence-checkout';
77-
return mode;
75+
if (mode === 'trails') return 'trails';
76+
if (mode === 'crypto') return 'crypto';
77+
return 'sequence-checkout';
7878
}
7979

8080
type SettingsProps = {

sdk/src/styles/styles.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,9 @@ export const styles = String.raw`/* Modified Tailwind CSS, to avoid issues with
19851985
.break-words {
19861986
overflow-wrap: break-word;
19871987
}
1988+
.wrap-anywhere {
1989+
overflow-wrap: anywhere;
1990+
}
19881991
.text-ellipsis {
19891992
text-overflow: ellipsis;
19901993
}

0 commit comments

Comments
 (0)