Commit 5d5f32ad authored by Alfred Malone's avatar Alfred Malone

Change symbols add Amount Left

parent d8c456f9
......@@ -2,15 +2,24 @@ import React from "react";
import { connect } from "react-redux";
const Stats = props => {
function amtLeft() {
let income = props.income;
let expense = props.expense;
return income - expense;
}
return (
<div className="d-flex justify-content-center text-center">
<div className="m-2">
<strong>Total Income</strong>
<p>${props.income}</p>
<p>{props.income}$</p>
</div>
<div className="m-2">
<strong>Total Expenses</strong>
<p>-${props.expense}</p>
<p>{props.expense}$</p>
</div>
<div className="m-2">
<strong>Amount Left</strong>
<p>${amtLeft()}</p>
</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