Skip to content

Commit f00cbc2

Browse files
feat(checkout-widgets): Allow hide header on Swap widget geoblocked screen (#2733)
Co-authored-by: priyaleedman <[email protected]>
1 parent fbcb1f6 commit f00cbc2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/checkout/widgets-lib/src/views/error/ServiceUnavailableToRegionErrorView.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { SimpleLayout } from '../../components/SimpleLayout/SimpleLayout';
44
import { HeaderNavigation } from '../../components/Header/HeaderNavigation';
55
import { SimpleTextBody } from '../../components/Body/SimpleTextBody';
66
import { NoServiceHero } from '../../components/Hero/NoServiceHero';
7-
import { FooterLogo } from '../../components/Footer/FooterLogo';
87
import { ServiceType } from './serviceTypes';
98

109
export interface ServiceUnavailableToRegionErrorViewProps {
@@ -14,6 +13,7 @@ export interface ServiceUnavailableToRegionErrorViewProps {
1413
onPrimaryButtonClick?: () => void;
1514
secondaryActionText?: string;
1615
onSecondaryButtonClick?: () => void;
16+
showHeader?: boolean;
1717
}
1818

1919
export function ServiceUnavailableToRegionErrorView({
@@ -23,17 +23,17 @@ export function ServiceUnavailableToRegionErrorView({
2323
onPrimaryButtonClick,
2424
secondaryActionText,
2525
onSecondaryButtonClick,
26+
showHeader = true,
2627
}: ServiceUnavailableToRegionErrorViewProps) {
2728
const { t } = useTranslation();
2829

2930
return (
3031
<SimpleLayout
31-
header={
32+
header={showHeader ? (
3233
<HeaderNavigation transparent onCloseButtonClick={onCloseClick} />
33-
}
34+
) : undefined}
3435
heroContent={<NoServiceHero />}
3536
floatHeader
36-
footer={<FooterLogo />}
3737
testId="service-unavailable-to-region-error-view"
3838
>
3939
<SimpleTextBody heading={t(`views.SERVICE_UNAVAILABLE_ERROR_VIEW.heading.${service}`)}>
@@ -42,7 +42,7 @@ export function ServiceUnavailableToRegionErrorView({
4242
components={{
4343
quickswapLink: <Link
4444
size="small"
45-
rc={<a target="_blank" href="https://quickswap.exchange" rel="noreferrer" />}
45+
rc={<a target="_blank" href="https://dapp.quickswap.exchange/?chainId=13371" rel="noreferrer" />}
4646
/>,
4747
immutableSupport: <Link
4848
size="small"

packages/checkout/widgets-lib/src/widgets/swap/SwapWidget.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ export default function SwapWidget({
411411
<ServiceUnavailableToRegionErrorView
412412
service={ServiceType.SWAP}
413413
onCloseClick={() => sendSwapWidgetCloseEvent(window)}
414+
showHeader={showHeader}
414415
primaryActionText={
415416
topUpOptions && topUpOptions?.length > 0
416417
? t(topUpOptions[0].textKey)

0 commit comments

Comments
 (0)