Skip to content

Commit

Permalink
Small appearance improvements when a force has no <cost>s yet
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueWinds committed Jul 31, 2023
1 parent 8413a22 commit bc7805b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ h2 button {
line-height: 1.8em;
}

h6 .errors {
h6 .errors:first-child {
margin-right: -1rem;
}

Expand Down
4 changes: 3 additions & 1 deletion src/Force/Force.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ const Force = () => {

const globalErrors = errors?.filter((e) => !e.includes('must have'))

const cost = costString(sumCosts(force))

return (
<section>
<h6>
{force.catalogueName}
<small>{force.name}</small>
<small>{costString(sumCosts(force))}</small>
{cost && <small>{cost}</small>}
{errors && (
<span className="errors" data-tooltip-id="tooltip" data-tooltip-html={errors.join('<br />')}>
Validation errors
Expand Down

0 comments on commit bc7805b

Please sign in to comment.