Skip to content

Commit

Permalink
fix: inability to generate default card for fresh installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Aug 17, 2024
1 parent 329c3f4 commit 0905c1d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ const Layout = () => {
const { success, error } = useMigrations(db, migrations)

useEffect(() => {
// reset defaults
startupApp()
initializeApp()
setFirstRender(false)
}, [])
// reset
if (success) {
startupApp()
initializeApp()
setFirstRender(false)
}
}, [success])

useEffect(() => {
if (success) SplashScreen.hideAsync()
Expand Down

0 comments on commit 0905c1d

Please sign in to comment.