Skip to content

Commit

Permalink
updated transaction, recipient list & mydonations
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulRafaySiddiqui committed Aug 13, 2020
1 parent 8d81f4a commit c4bab45
Show file tree
Hide file tree
Showing 19 changed files with 10,875 additions and 8,663 deletions.
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"uuid": "^8.2.0",
"web3": "^1.2.9"
"web3": "^1.2.9",
"yup": "^0.29.3"
},
"scripts": {
"start": "react-scripts start",
Expand Down
11 changes: 9 additions & 2 deletions src/components/Campaign/Campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ import React from 'react';
import classes from './Campaign.module.css'
import { useHistory } from 'react-router-dom';
import { FaCalendarAlt } from 'react-icons/fa';
import { IconContext } from "react-icons"
import { IconContext } from "react-icons";
import { Badge } from 'react-bootstrap';

export const Campaign = ({ campaign }) => {
const history = useHistory();
return (
<div className={classes.Card} onClick={() => history.push(`/campaign${campaign.address}`)}>
{/* Title */}
<h2> {campaign.title} </h2>

{/* Status */}
<Badge style={{ marginTop: '10px', marginLeft: '10px' }} variant={campaign.status === 'Closed' ? 'danger' : campaign.status === 'Goal Pending' ? 'warning' : 'success'}>{campaign.status}</Badge>

{/* Description */}
<p className={classes.Description} > {campaign.description} </p>
{/* <p className={classes.CreatedBy} > Manager: {campaign.manager} </p> */}

<IconContext.Provider value={{ className: classes.DateIcon }}>
<FaCalendarAlt /> <p className={classes.DateCreated}>Created at: {campaign.createdAt.toDateString()}</p>
</IconContext.Provider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Campaign/Campaign.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.Card {
cursor: pointer;
max-width: 400px;
height: 240px;
height: 260px;
margin: 15px;
background-color: #fff;
border-radius: 10px;
Expand Down
3 changes: 2 additions & 1 deletion src/components/CampaignDetails/CampaignDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export const CampaignDetails = ({ campaign, style, loadCampaignDetails }) => {
{/* Status */}
<Row>
<Col lg='auto' className='ml-auto my-3'>
<FaExclamationCircle className='mb-1' /> Status: {campaign.status}
<FaExclamationCircle className='mb-1' /> Status:
<b style={{ color: campaign.status === 'Closed' ? 'red' : campaign.status === 'Goal Reached' ? 'green' : 'yellow' }} > {campaign.status}</b>
</Col>
</Row>

Expand Down
Loading

0 comments on commit c4bab45

Please sign in to comment.