add view-subscriptions link

This commit is contained in:
Barry Gitarts 2019-04-11 06:06:26 -04:00
parent df420efd19
commit 8499a1bf61
2 changed files with 5 additions and 2 deletions

View File

@ -61,7 +61,9 @@ function MainMenu({ classes, history }) {
<Link to={`/create-subscription`} className={classes.link}>
<Button type="submit" color="primary" variant="contained" className={classes.button}>Create Subscription</Button>
</Link>
<Button type="submit" color="secondary" variant="contained" className={classes.button}>Manage Subscription</Button>
<Link to={`/view-subscriptions`} className={classes.link}>
<Button type="submit" color="secondary" variant="contained" className={classes.button}>Your Subscribers</Button>
</Link>
</div>
)
}

View File

@ -115,9 +115,10 @@ const SubscriptionInfo = ({ agreement, classes }) => {
useEffect(
() => {
let timer1 = setInterval(() => computeAndSetAccrued(annualAmount, startDate, setAccrued), 1000)
let timer2 = setInterval(() => computeAndSetAccruedInterest(annualAmount, startDate, interestRate, setAccruedInterest))
let timer2 = setInterval(() => computeAndSetAccruedInterest(annualAmount, startDate, interestRate, setAccruedInterest), 1000)
return () => {
clearTimeout(timer1)
clearTimeout(timer2)
}
}, [])
return (