From 06ae0747d0a83566477f6f3ac5e05be34bfc7837 Mon Sep 17 00:00:00 2001 From: Chris Wilton-Magras Date: Tue, 9 Apr 2024 08:57:58 +0100 Subject: [PATCH] remove redundant section --- .github/workflows/github-pages.yml | 27 +++++++++++++-------------- index.html | 2 +- src/App.css | 3 +-- src/App.tsx | 16 ++++++---------- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index ec34a72..5a74a05 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -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 diff --git a/index.html b/index.html index fefbd42..c5e1c96 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - Counter Demo + Disabled Buttons Demo
diff --git a/src/App.css b/src/App.css index cc578d7..87f7e22 100644 --- a/src/App.css +++ b/src/App.css @@ -5,8 +5,7 @@ body { justify-content: center; } -main, -main section { +main { display: grid; align-items: center; gap: 0.75rem; diff --git a/src/App.tsx b/src/App.tsx index 2f68f4a..c5fbb3a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import './App.css'; -function App() { +const App = () => { const [count, setCount] = useState(0); const downIsDisabled = count <= 0; @@ -12,14 +12,10 @@ function App() { return (
-
-

- Counter -

-
- {count} -
-
+

Counter

+
+ {count} +
); -} +}; export default App;