Skip to content

Commit

Permalink
remove redundant section
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswilty committed Apr 9, 2024
1 parent e5115ea commit 06ae074
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Counter Demo</title>
<title>Disabled Buttons Demo</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 1 addition & 2 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ body {
justify-content: center;
}

main,
main section {
main {
display: grid;
align-items: center;
gap: 0.75rem;
Expand Down
16 changes: 6 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import './App.css';

function App() {
const App = () => {
const [count, setCount] = useState(0);
const downIsDisabled = count <= 0;

Expand All @@ -12,14 +12,10 @@ function App() {

return (
<main>
<section aria-labelledby="count-heading">
<h1 id="count-heading" className="boxed">
Counter
</h1>
<div aria-live="polite" className="value boxed">
{count}
</div>
</section>
<h1 className="boxed">Counter</h1>
<div aria-description="value" aria-live="polite" className="value boxed">
{count}
</div>
<div className="control-box">
<button
aria-disabled={downIsDisabled}
Expand All @@ -44,6 +40,6 @@ function App() {
</div>
</main>
);
}
};

export default App;

0 comments on commit 06ae074

Please sign in to comment.