Skip to content

Commit

Permalink
Minor improvements to ticker and commodity view
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Oct 8, 2024
1 parent 7e61d5b commit d6cfa95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ export default () => {
{item.stockBracket === 3 && <>{item.stock.toLocaleString()} T<br />{item.buyPrice.toLocaleString()} CR/T</>}
</span>
<span className='news-ticker__ticker-item-price-difference'>
{item.demandBracket === 3 && <span className='muted'>AVG {item.avgSellPrice.toLocaleString()} CR</span>}
{item.stockBracket === 3 && <span className='muted'>AVG {item.avgBuyPrice.toLocaleString()} CR</span>}
{item.avgSellPrice !== 0 && item.demandBracket === 3 && <span className='muted'>AVG {item.avgSellPrice.toLocaleString()} CR</span>}
{item.avgBuyPrice !== 0 && item.stockBracket === 3 && <span className='muted'>AVG {item.avgBuyPrice.toLocaleString()} CR</span>}
<br />
{item.demandBracket === 3 &&
{item.demandBracket === 3 && item.avgSellPrice !== 0 &&
<>
{item.sellPrice > item.avgSellPrice && <small className='commodity__price text-positive '>+ {(item.sellPrice - item.avgSellPrice).toLocaleString()} CR</small>}
{item.sellPrice < item.avgSellPrice && <small className='commodity__price text-negative'>- {(item.avgSellPrice - item.sellPrice).toLocaleString()} CR</small>}
</>}
{item.stockBracket === 3 &&
{item.stockBracket === 3 && item.avgBuyPrice !== 0 &&
<>
{item.buyPrice > item.avgBuyPrice && <small className='commodity__price text-negative'>- {(item.buyPrice - item.avgBuyPrice).toLocaleString()} CR</small>}
{item.buyPrice < item.avgBuyPrice && <small className='commodity__price text-positive'>+ {(item.avgBuyPrice - item.buyPrice).toLocaleString()} CR</small>}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-www",
"version": "0.63.1",
"version": "0.63.2",
"description": "Ardent Industry",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions pages/commodity/[commodity-name]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default () => {
value={commodity.totalDemand}
style={{ maxWidth: '12rem', height: '1.25rem' }}
/>
<p style={{ margin: '0 0 .15rem 0', lineHeight: '0.8rem' }}><small>{commodity.totalDemand.toLocaleString()} T</small></p>
<p style={{ margin: '0 0 .15rem 0', lineHeight: '1.25rem', fontSize: '0.9rem' }}>{commodity.totalDemand.toLocaleString()} T</p>
</>
)
: <InsufficentData />}
Expand All @@ -260,7 +260,7 @@ export default () => {
value={commodity.totalStock}
style={{ maxWidth: '12rem', height: '1.25rem' }}
/>
<p style={{ margin: '0 0 .15rem 0', lineHeight: '0.8rem' }}><small>{commodity.totalStock.toLocaleString()} T</small></p>
<p style={{ margin: '0 0 .15rem 0', lineHeight: '1.25rem', fontSize: '0.9rem' }}>{commodity.totalStock.toLocaleString()} T</p>
</>
)
: <InsufficentData />}
Expand Down

0 comments on commit d6cfa95

Please sign in to comment.