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