added add card API
This commit was merged in pull request #65.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import React, {useEffect} from 'react'
|
||||
import {useLocation, useNavigate} from 'react-router-dom'
|
||||
import Payment from '../components/Payment/Payment'
|
||||
import { RouteHandler } from '../router/routes'
|
||||
|
||||
export default function PaymentPage() {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const queryParams = new URLSearchParams(location?.search);
|
||||
const trxRef = queryParams.get("trxref");
|
||||
const reference = queryParams.get("reference");
|
||||
console.log('LOC', trxRef, reference)
|
||||
|
||||
useEffect(()=>{
|
||||
if(!trxRef || !reference){
|
||||
navigate(RouteHandler.dashboardHome, {replace:true})
|
||||
}
|
||||
},[])
|
||||
return (
|
||||
<>
|
||||
<Payment />
|
||||
</>
|
||||
)
|
||||
}
|
||||
+3
-1
@@ -11,6 +11,7 @@ import PersonalBankingPage from "./PersonalBankingPage";
|
||||
import BusinessBankingPage from "./BusinessBankingPage";
|
||||
import CooperateBankingPage from "./CooperateBankingPage";
|
||||
import LetsGetStatedPage from "./LetsGetStatedPage";
|
||||
import PaymentPage from "./PaymentPage";
|
||||
|
||||
export {
|
||||
HomePage,
|
||||
@@ -25,5 +26,6 @@ export {
|
||||
PersonalBankingPage,
|
||||
BusinessBankingPage,
|
||||
CooperateBankingPage,
|
||||
LetsGetStatedPage
|
||||
LetsGetStatedPage,
|
||||
PaymentPage
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user