Skip to content

Commit

Permalink
fix confetti
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Nov 28, 2024
1 parent eccde36 commit effa667
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 8 additions & 3 deletions app/src/pages/Dashboard/components/NewGalleryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export const NewGalleryForm = ({ modalKey }: { modalKey: string }) => {
useMetagalleryStore.getState().closeModal(modalKey);
});

const creationEnabled = form.values.title.length > 3 && form.values.slug.length > 3 && form.values.description.length > 3;

return (
<Stack>
<Text size="xl" fw={700}>Crear nueva galería</Text>
Expand Down Expand Up @@ -133,9 +135,12 @@ export const NewGalleryForm = ({ modalKey }: { modalKey: string }) => {
<Button
type="submit"
variant="primary"
// disabled={!form.isDirty()}
// disabled={!form.isDirty()}
bg={form.isDirty() ? 'black' : 'gray.7'}
disabled={!creationEnabled}
bg={
creationEnabled
? 'black'
: 'gray.7'
}
>
Crear galería
</Button>
Expand Down
4 changes: 0 additions & 4 deletions app/src/providers/MetagalleryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ export const MetagalleryProvider = ({ children }: { children: ReactNode }) => {
numberOfPieces={showingConfetti ? 200 : 0}
width={width}
height={height}
style={{
width: 0, height: 0,
overflow: 'hidden',
}}
/>
</>
);
Expand Down

0 comments on commit effa667

Please sign in to comment.