Skip to content

Refactor/token validation hook#319

Open
SarthakDudhe wants to merge 5 commits into
QuoteVote:mainfrom
SarthakDudhe:refactor/token-validation-hook
Open

Refactor/token validation hook#319
SarthakDudhe wants to merge 5 commits into
QuoteVote:mainfrom
SarthakDudhe:refactor/token-validation-hook

Conversation

@SarthakDudhe
Copy link
Copy Markdown

This PR addresses the // TODO: Abstract validation into custom hook in PasswordResetPage.jsx and Scoreboard.jsx.

Changes:

Created a new useTokenValidation hook in client/src/hooks/.
The hook supports redirectToIfValid and redirectToIfInvalid parameters.
Refactored Scoreboard.jsx to use the hook for session sync.
Refactored PasswordResetPage.jsx to use the hook for authenticated user redirection.
Removed redundant useEffect blocks and tokenValidator imports from the refactored components.

…ied HTML

Modified getPost resolver to support urlId and hardened edge function regexes. Fixes QuoteVote#230
Implements the UI for showing quote-specific votes calculated from the interactions array. Added smaller icons and tooltips for clarity.
Added href properties to Link components and removed ESLint suppressions. Fixed a typo on the title link.
Implemented a point system based on posts, quotes, and votes. Fixed a database query bug for user votes.
…ation hook

Created useTokenValidation hook and refactored Scoreboard and PasswordResetPage to use it. This improves code reuse and maintainability.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 2, 2026

Deploy Preview for quotevote ready!

Name Link
🔨 Latest commit 1d02ea2
🔍 Latest deploy log https://app.netlify.com/projects/quotevote/deploys/69f5ea91d4a6020008a32390
😎 Deploy Preview https://deploy-preview-319--quotevote.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.

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