Skip to content

Commit

Permalink
fix year 0 bug, fix disabled buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavAndreasson committed Dec 19, 2023
1 parent bdb56fe commit 28b5a8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/RecordInfo/RecordInfo.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ const RecordInfo = ({
.join(" ")}
</div>
)}
{rec.year && (
{(rec.year && (
<div className="year" onClick={() => handleYearClick(rec.year)}>
{rec.year}
</div>
)}
)) ||
null}
{rec.price && rate && (
<div className="price">
{"(" + (rec.price * rate).toFixed(2) + " " + currency + ")"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const GridSettings = ({ gridView, gridColumns, setGridView, setGridColumns }) =>
type="button"
className={"fas fa-grip-horizontal" + (!gridView ? " selected" : "")}
onClick={() => setGridView(false)}
enabled={gridView.toString()}
disabled={!gridView}
></button>
<button
type="button"
className={"fas fa-list" + (gridView ? " selected" : "")}
onClick={() => setGridView(true)}
enabled={(!gridView).toString()}
disabled={gridView}
></button>
</div>
{gridView && (
Expand Down

0 comments on commit 28b5a8b

Please sign in to comment.