Skip to content

refactor: TwoFactor.tsx#9392

Merged
PeerRich merged 4 commits intocalcom:mainfrom
Riyan-Mo:patch-2
Jun 9, 2023
Merged

refactor: TwoFactor.tsx#9392
PeerRich merged 4 commits intocalcom:mainfrom
Riyan-Mo:patch-2

Conversation

@Riyan-Mo
Copy link
Copy Markdown
Contributor

@Riyan-Mo Riyan-Mo commented Jun 7, 2023

What does this PR do?

Improvements made:

  1. Renamed the onChange function to setValue for clarity.
  2. Changed the usage of onChange to setValue in useDigitInput and removed the dependency on the value state variable.
  3. Replaced the hidden type="hidden" input with the register function from react-hook-form.
  4. Used map to render the Input components instead of manually repeating them.
  5. Updated the key prop for each Input component to include the index.
  6. Added the autoFocus prop to the first Input component for better user experience.
  7. Removed the unnecessary eslint-disable-next-line comment.

Fixes # (issue)

Type of change

  • Chore (refactoring code, technical debt, workflow improvements)

How should this be tested?

  • Test A
  • Test B

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't checked if my PR needs changes to the documentation

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 9, 2023 8:13am
website ❌ Failed (Inspect) Jun 9, 2023 8:13am

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2023

@riyan911 is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@Udit-takkar Udit-takkar changed the title Update TwoFactor.tsx refactor: TwoFactor.tsx Jun 8, 2023
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Copy link
Copy Markdown
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM

@PeerRich PeerRich enabled auto-merge June 9, 2023 08:08
@PeerRich PeerRich added this pull request to the merge queue Jun 9, 2023
Merged via the queue into calcom:main with commit aaab4ca Jun 9, 2023
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.

3 participants