Created
May 17, 2022 22:52
-
-
Save yotavm/6f645cc08aaac6421b1f934a767ec6f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { render } = require("react-dom"); | |
const app = () => { | |
<Router> | |
<Route path='/IDR' compnent={IDRWizard}/> | |
<Route path='/PSLF' compnent={IDRWizard}/> | |
option | |
<Route path='/payment/{pathName}' compnent={Paywall} /> | |
</Router> | |
} | |
option 2 and 3 | |
1. navigation middlwarew | |
2. payment middlware -> listen to url -> redirect the user to idr | |
const IDRWizard = () => { | |
<Paywall isOpen={} render hanldleSucess={next}/> | |
}; | |
const PSLFwizard = () => { | |
<Paywall isOpen={if this is the step i need open} render hanldleSucess={next}/> | |
} | |
const Paywall = () => { | |
render | |
only if props say render | |
<modal> | |
</modal> | |
} | |
const Payment = () => { | |
logic to retirct the user to PSLF or IDR | |
redirectiong | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment