Skip to content

Commit

Permalink
Minimum viable mobile fix
Browse files Browse the repository at this point in the history
Confetti canvas resize when window resizes
Give everything min-width: 0px
Remove .rbc-btn-group { white-space: nowrap } rule
  • Loading branch information
parkerdavis1 committed Mar 4, 2024
1 parent 3b85c3b commit f97d5d6
Show file tree
Hide file tree
Showing 5 changed files with 560 additions and 517 deletions.
6 changes: 4 additions & 2 deletions app/components/confetti.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Index as ConfettiShower } from 'confetti-react'
import { ClientOnly } from 'remix-utils'
import { useWindowSize } from '@uidotdev/usehooks'

/**
* confetti is a unique random identifier which re-renders the component
*/
export function Confetti({ confetti }: { confetti?: string }) {
const { width, height } = useWindowSize()
return (
<ClientOnly>
{() => (
Expand All @@ -13,8 +15,8 @@ export function Confetti({ confetti }: { confetti?: string }) {
run={Boolean(confetti)}
recycle={false}
numberOfPieces={500}
width={window.innerWidth}
height={window.innerHeight}
width={width}

Check failure on line 18 in app/components/confetti.tsx

View workflow job for this annotation

GitHub Actions / ʦ TypeScript

Type 'number | null' is not assignable to type 'number | undefined'.
height={height}

Check failure on line 19 in app/components/confetti.tsx

View workflow job for this annotation

GitHub Actions / ʦ TypeScript

Type 'number | null' is not assignable to type 'number | undefined'.
/>
)}
</ClientOnly>
Expand Down
Loading

0 comments on commit f97d5d6

Please sign in to comment.