From 9856ad80015f9e57616e5b86e2eec79c091373a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Apr 2026 17:35:46 +0800 Subject: [PATCH] chore(deps): bump actions/upload-pages-artifact from 4 to 5 (#24) * chore(deps): bump actions/upload-pages-artifact from 4 to 5 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](https://github.com/actions/upload-pages-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix: avoid effect-based UUID initialization * chore: normalize App.tsx line endings --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: root --- .github/workflows/deploy.yml | 2 +- src/App.tsx | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dee0426..76bd8aa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,7 +41,7 @@ jobs: uses: actions/configure-pages@v6 - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v5 with: path: './dist' diff --git a/src/App.tsx b/src/App.tsx index db4abe3..da37eaa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,8 +10,8 @@ import { generateUUID, getAllFormats, UUIDFormats, UUIDVersion } from './lib/uui import './styles/App.css' function App() { - const [currentUUID, setCurrentUUID] = useState('') - const [formats, setFormats] = useState(null) + const [currentUUID, setCurrentUUID] = useState(() => generateUUID('v4')) + const [formats, setFormats] = useState(() => getAllFormats(currentUUID)) const [isLocked, setIsLocked] = useState(false) const [version, setVersion] = useState('v4') const [autoGenerate, setAutoGenerate] = useState(false) @@ -52,12 +52,6 @@ function App() { showToast('UUID loaded successfully', 'success') } - // Generate initial UUID on mount - useEffect(() => { - handleGenerate() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - // Auto-generate functionality useEffect(() => { if (!autoGenerate || isLocked) return