Skip to content

Commit

Permalink
Close modal if there's no palette left
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgrozer committed Jun 30, 2024
1 parent bca17f1 commit eea52cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/LoadModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export default ({ modalIsOpen, closeModal }) => {
maxAge: 315360000
})
setState({ palettes: newPalettes })

if (!newPalettes.length) {
closeModal()
}
}

return (
Expand Down

0 comments on commit eea52cf

Please sign in to comment.