Skip to content

fix: lanyard redirect - #869

Open
juliankepka wants to merge 1 commit into
mainfrom
fix/setup-page
Open

fix: lanyard redirect#869
juliankepka wants to merge 1 commit into
mainfrom
fix/setup-page

Conversation

@juliankepka

Copy link
Copy Markdown
Collaborator
evidence.mov

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the /setup page to ensure the dynamically loaded Lanyard component is re-mounted across navigation/redirect transitions, preventing stale WebGL/physics state from persisting when the route changes.

Changes:

  • Track the current route pathname and force a Lanyard remount by changing its React key.
  • Reorder/setup hooks to support the remount behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to +38
const pathname = usePathname();
const [lanyardKey, setLanyardKey] = useState(0);
const isFirstRender = useRef(true);

useEffect(() => {

@timbastin timbastin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think copilot is right :/

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.

Three.js DevGuard card becomes invisible when navigating away from the Setup page

3 participants