Skip to content

🔧 Fix Code Quality: window.location.search used instead of router's useSearch()#2

Open
manos-saratsis wants to merge 1 commit into
masterfrom
orchestrai/fix-code_quality-1772145783500
Open

🔧 Fix Code Quality: window.location.search used instead of router's useSearch()#2
manos-saratsis wants to merge 1 commit into
masterfrom
orchestrai/fix-code_quality-1772145783500

Conversation

@manos-saratsis

Copy link
Copy Markdown
Owner

Issue Fixed

Type: Code Quality
File: frontend/src/routes/reset-password.tsx
Line: 46

Description

Direct access to window.location couples the component to the browser environment, bypasses the router's state, and makes unit testing impossible without jsdom mocks.

Suggested Fix

Add token to the route's search schema via validateSearch and access it with Route.useSearch(), consistent with how admin.tsx handles search params.

Changes Made

  • Applied AI-generated fix to resolve the issue
  • Preserved existing code structure and style

Generated by OrchestrAI Software Engineer

…'s useSearch()

File: frontend/src/routes/reset-password.tsx
Direct access to window.location couples the component to the browser environment, bypasses the router's state, and makes unit testing impossible without jsdom mocks.

Generated by OrchestrAI Code Fix
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.

1 participant