Skip to content

Fix: Remove duplicate hooks and resolve ReferenceError crash#133

Open
indresh404 wants to merge 5 commits into
Debmallya-03:mainfrom
indresh404:ReferenceError
Open

Fix: Remove duplicate hooks and resolve ReferenceError crash#133
indresh404 wants to merge 5 commits into
Debmallya-03:mainfrom
indresh404:ReferenceError

Conversation

@indresh404

@indresh404 indresh404 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Fix: Remove duplicate hooks and resolve ReferenceError crash

closes #94

Issue Fixed

  • Fixed ReferenceError: isMobile is not defined caused by duplicate hooks/functions declared before state initialization
  • Removed duplicate isMobile, containerRef, previewRef declarations
  • Removed duplicate handleDragStart, handleDragMove functions
  • Removed duplicate fullscreenchange and resize useEffect hooks
  • Fixed broken line: newRatio = ((clientX - rect...newRatio = ((clientX - rect.left) / rect.width) * 100
  • Fixed hydration mismatches by moving localStorage/URL reads to useEffect

Changes Made

  • Kept only ONE instance of each state/ref/hook
  • Preserved useCallback version of drag handlers
  • Client-side data now loads after mount to match SSR

Labels

  • gssoc:approved
  • level:critical
  • quality:exceptional

@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

@indresh404 is attempting to deploy a commit to the debmallya-03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented May 25, 2026

Copy link
Copy Markdown

Deploy Preview for webifynet ready!

Name Link
🔨 Latest commit 8116d52
🔍 Latest deploy log https://app.netlify.com/projects/webifynet/deploys/6a1d523107b14d0008db54a0
😎 Deploy Preview https://deploy-preview-133--webifynet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@indresh404

Copy link
Copy Markdown
Contributor Author

@Debmallya-03 Check if any issue u can mention i can fix

@indresh404

Copy link
Copy Markdown
Contributor Author

@Debmallya-03 check

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.

ReferenceError: isMobile is not defined & Duplicate JSX Layout Structure

1 participant