Skip to content

Commit

Permalink
Merge pull request #4 from LauraCole1900/feature/linting-test
Browse files Browse the repository at this point in the history
updating yaml file for 20.24
  • Loading branch information
LauraCole1900 authored Jan 17, 2025
2 parents 21e4bca + 653a3c6 commit 535fb3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1

- name: Use Node.js 20.x
- name: Use Node.js 21.x
uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: 21.x

# Install dependencies
- name: 🧰 Install Deps
Expand Down
4 changes: 2 additions & 2 deletions src/components/Advertisement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ interface AdvertisementProps {
companyName: string;
productDescription: string;
price: string;
};
}

function Advertisement(props: AdvertisementProps) {
return (
Expand All @@ -11,7 +11,7 @@ function Advertisement(props: AdvertisementProps) {
<p>{props.productDescription}</p>
<p>{props.price}</p>
</div>
);
)
}

export default Advertisement;
7 changes: 4 additions & 3 deletions src/components/Calculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ export default function Calculator() {
const [value, setValue] = useState(0);

const handleAddClick = () => {
setCalcState({ total: calcState.total + value, previousTotal: calcState.total});
setCalcState({ total: calcState.total + value, previousTotal: calcState.total });
};

return (
<div className="calculator">
<h2>Simple Calculator</h2>
<p>
<input
type="text"
id="value"
name="value"
onChange={(event) => { setValue(Number(event.target.value)); }}
value={value}
name="value"
onChange={(event) => { setValue(Number(event.target.value)) }}
/>
</p>
<button className="btn btn-primary" type="button" onClick={handleAddClick}> Add </button>
Expand Down

0 comments on commit 535fb3b

Please sign in to comment.