Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
make negative days to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Feb 27, 2021
1 parent 915f05b commit 33b330c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"express": "^4.17.1",
"history": "^4.7.2",
"hive-uri": "^0.2.3",
"hivesigner": "^3.2.2",
"hivesigner": "^3.2.3",
"html-react-parser": "^1.2.1",
"i18next": "^19.4.4",
"i18next-browser-languagedetector": "^4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/proposal-list-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export class ProposalListItem extends Component<Props, State> {

const allPayment = dailyPayment * duration;
const strAllPayment = numeral(allPayment).format("0.0a");

const remaining = endDate.diff(moment(now()), 'days');
const diff = endDate.diff(moment(now()), 'days');
const remaining = diff < 0 ? 0 : diff;

return (
<div className="proposal-list-item">
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5028,10 +5028,10 @@ hive-uri@^0.2.3:
resolved "https://registry.yarnpkg.com/hive-uri/-/hive-uri-0.2.3.tgz#a0d9bc69d44423e660c84dd57fdadb6994481b8d"
integrity sha512-q6zp2sh5fjs6cf4T2oHvXt4IFNMmGBTRT5uKuxK/y//5XXCSbOGY/B/DKfK+7hwT8arMhcnbtKdlKarZu2SsXA==

hivesigner@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.2.tgz#c9a5bcbcf1e591f0bc8b5d3307b13928692b6961"
integrity sha512-S8Xk2KZTpLNXo1oW8P6XNKodFOxWzvnspqRJtU2O7h1RI9ffyGTE63E3S/tEpJpirTRbvif88Vp4t1hJGvIS0w==
hivesigner@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.3.tgz#f7d19d72cde26b9aec7fdeb44ef234a0607ad4d1"
integrity sha512-qDPl2wdggp1b8LA7gAWbyFdPSNWkUOorTgor2owP6IEZbxK1vFM3oFwdxxwlaBPAhNjQeJEkSPmRDBP85vv7Zg==
dependencies:
cross-fetch "^3.0.6"
hive-uri "^0.2.3"
Expand Down

0 comments on commit 33b330c

Please sign in to comment.