Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🎸 Add See More Section #428

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Malayvasa
Copy link
Contributor

Related to #384

Comment on lines 32 to 43
useEffect(() => {
if (!containerRef.current) return

const updateWidth = (entries: ResizeObserverEntry[]) => {
setWidth(entries[0].contentRect.width)
}

const resizeObserver = new ResizeObserver(updateWidth)
resizeObserver.observe(containerRef.current)

return () => resizeObserver.disconnect()
}, [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: let's move this to a custom hook. We could make it reusable and return the width and height.


pathRef.current?.setAttribute('d', `M${path}`)

requestRef.current = requestAnimationFrame(animate)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to use a ref for this. We can use a local variable.

@Malayvasa Malayvasa requested a review from iamacook August 1, 2024 11:15
@Malayvasa Malayvasa changed the base branch from malay-branch-1 to main August 2, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants