Skip to content

Instantly share code, notes, and snippets.

@yotavm
Created May 17, 2022 22:52
Show Gist options
  • Save yotavm/6f645cc08aaac6421b1f934a767ec6f2 to your computer and use it in GitHub Desktop.
Save yotavm/6f645cc08aaac6421b1f934a767ec6f2 to your computer and use it in GitHub Desktop.
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