Skip to content

Commit

Permalink
Fix route for manual KYB callback
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Oct 18, 2024
1 parent 727d4c3 commit 1814d9e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions centrifuge-app/src/components/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const NavManagementPage = React.lazy(() => import('../pages/NavManagement'))
const PoolTransactionsPage = React.lazy(() => import('../pages/PoolTransactions'))
const ConvertAddressPage = React.lazy(() => import('../pages/ConvertAddress'))
const PoolsPage = React.lazy(() => import('../pages/Pools'))
const ManualKybRedirectPage = React.lazy(() => import('../pages/Onboarding/KnowYourBusiness/ManualKybRedirect'))

const router = createHashRouter([
{
Expand Down Expand Up @@ -143,6 +144,11 @@ const router = createHashRouter([
handle: { component: ConvertAddressPage },
},
{ path: '/nav-management/:pid', element: <NavManagementPage />, handle: { component: NavManagementPage } },
{
path: '/manual-kyb-redirect',
element: <ManualKybRedirectPage />,
handle: { component: ManualKybRedirectPage },
},
{ path: '*', element: <NotFoundPage />, handle: { component: NotFoundPage } },
],
errorElement: <NotFoundPage />,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { useEffect } from 'react'

const ManualKybRedirect: React.FC = () => {
useEffect(() => {
window.parent.postMessage('manual.onboarding.completed', '*')
}, [])

return <div style={{ display: 'none' }}></div>
}

export default ManualKybRedirect

0 comments on commit 1814d9e

Please sign in to comment.