Commit 9c843d58 authored by mgabdev's avatar mgabdev

Updated progress panel

parent 05d4c921
...@@ -5,8 +5,9 @@ export default class ProgressPanel extends React.PureComponent { ...@@ -5,8 +5,9 @@ export default class ProgressPanel extends React.PureComponent {
render() { render() {
if (!monthlyExpensesComplete) return null; if (!monthlyExpensesComplete) return null;
const completed = Math.min(monthlyExpensesComplete, 100);
const style = { const style = {
width: `${monthlyExpensesComplete}%`, width: `${completed}%`,
}; };
return ( return (
...@@ -18,7 +19,7 @@ export default class ProgressPanel extends React.PureComponent { ...@@ -18,7 +19,7 @@ export default class ProgressPanel extends React.PureComponent {
<span className='progress-panel__text'>We are 100% funded by you.</span> <span className='progress-panel__text'>We are 100% funded by you.</span>
<div className='progress-panel__bar-container'> <div className='progress-panel__bar-container'>
<a className='progress-panel__bar' style={style} href='https://shop.dissenter.com/category/donations'> <a className='progress-panel__bar' style={style} href='https://shop.dissenter.com/category/donations'>
<span className='progress-panel__bar__text'>{monthlyExpensesComplete}% covered this month</span> <span className='progress-panel__bar__text'>{completed}% covered this month</span>
</a> </a>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment