From 74f0aae77d10df2be5270ff40e1a68747078316d Mon Sep 17 00:00:00 2001 From: Ilias Trichopoulos Date: Mon, 3 Feb 2025 15:50:38 +0100 Subject: [PATCH] Rename onramp callback page --- src/pages/banxa-callback.tsx | 51 ++++------------------------------- src/pages/onramp-callback.tsx | 50 ++++++++++++++++++++++++++++++++++ static/robots.txt | 3 +++ 3 files changed, 58 insertions(+), 46 deletions(-) create mode 100644 src/pages/onramp-callback.tsx diff --git a/src/pages/banxa-callback.tsx b/src/pages/banxa-callback.tsx index 3187ccf3..d8c72693 100644 --- a/src/pages/banxa-callback.tsx +++ b/src/pages/banxa-callback.tsx @@ -1,50 +1,9 @@ -import styled, { ThemeProvider } from 'styled-components' +import { useEffect } from 'react' -import GlobalStyle from '../styles/global-style' -import { darkTheme } from '../styles/themes' +const BanxaCallback = () => { + useEffect(() => window.location.replace('/onramp-callback'), []) -import PageSectionContainer from '../components/PageSectionContainer' -import { useEffect, useState } from 'react' - -const CLOSE_BANXA_TAB_DEEP_LINK = 'alephium://close-banxa-tab' - -const BanxaCallbackPage = () => { - const [countdown, setCountdown] = useState(5) - - useEffect(() => { - if (countdown === 0) { - window.open(CLOSE_BANXA_TAB_DEEP_LINK, '_self') - } else { - const interval = setInterval(() => setCountdown(countdown - 1), 1000) - - return () => clearInterval(interval) - } - }, [countdown]) - - return ( - - -
- -
-

Purchace completed! ✅

-

The funds will be sent to your wallet shortly.

- {countdown > 0 && Redirecting to your wallet in {countdown}...} -
-
-
-
- ) + return null } -export default BanxaCallbackPage - -const PageSectionContainerStyled = styled(PageSectionContainer)` - display: flex; - align-items: center; - justify-content: center; -` - -const CountdownText = styled.h3` - color: ${({ theme }) => theme.textSecondary}; -` +export default BanxaCallback diff --git a/src/pages/onramp-callback.tsx b/src/pages/onramp-callback.tsx new file mode 100644 index 00000000..fc221d03 --- /dev/null +++ b/src/pages/onramp-callback.tsx @@ -0,0 +1,50 @@ +import styled, { ThemeProvider } from 'styled-components' + +import GlobalStyle from '../styles/global-style' +import { darkTheme } from '../styles/themes' + +import PageSectionContainer from '../components/PageSectionContainer' +import { useEffect, useState } from 'react' + +const CLOSE_ONRAMP_TAB_DEEP_LINK = 'alephium://close-onramp-tab' + +const OnrampCallbackPage = () => { + const [countdown, setCountdown] = useState(5) + + useEffect(() => { + if (countdown === 0) { + window.open(CLOSE_ONRAMP_TAB_DEEP_LINK, '_self') + } else { + const interval = setInterval(() => setCountdown(countdown - 1), 1000) + + return () => clearInterval(interval) + } + }, [countdown]) + + return ( + + +
+ +
+

Purchace completed! ✅

+

The funds will be sent to your wallet shortly.

+ {countdown > 0 && Redirecting to your wallet in {countdown}...} +
+
+
+
+ ) +} + +export default OnrampCallbackPage + +const PageSectionContainerStyled = styled(PageSectionContainer)` + display: flex; + align-items: center; + justify-content: center; +` + +const CountdownText = styled.h3` + color: ${({ theme }) => theme.textSecondary}; +` diff --git a/static/robots.txt b/static/robots.txt index 14004948..1264d4d1 100644 --- a/static/robots.txt +++ b/static/robots.txt @@ -3,3 +3,6 @@ Disallow: /cmc-application-proof.txt User-agent: * Disallow: /banxa-callback + +User-agent: * +Disallow: /onramp-callback