snowballtools-base/packages/backend
Vivian Phung f2e59c11fd
Refactor: VerifyCodeInput Component and Modify Access Code Validation (#212)
### TL;DR

Implemented the new `VerifyCodeInput` component and updated the access code validation logic.

### What changed?

1. Added a new reusable `VerifyCodeInput` component for verifying codes in a user-friendly way. This component handles paste events, input changes, and keyboard navigation.
2. Updated the backend route `/accesscode` to accept an arbitrary code for now. 
3. Incorporated the `VerifyCodeInput` component into the `AccessCode` page, replacing the generic `Input` component.
4. Updated the access code validation logic to check for a trimmed length of 5 characters instead of 6.
5. Added a slight pause for UX purposes when validating the access code on the frontend.

### How to test?

1. Go to the Access Code page.
2. Try entering an access code with various inputs (keyboard, paste, etc.) to see if it works seamlessly.
3. Verify that only a 5-digit code is considered valid.
4. Check the backend logs to ensure the validation endpoint is working as expected.

### Why make this change?

This change improves the user experience by providing a custom input component for access code verification and ensures that the access code validation meets the new requirements.

---
2024-06-21 21:13:32 -04:00
..
environments ignore backend env file and readme 2024-02-26 17:33:44 -05:00
src Refactor: VerifyCodeInput Component and Modify Access Code Validation (#212) 2024-06-21 21:13:32 -04:00
test Merge branch 'ng-check-deployment-removal-record' 2024-05-22 10:41:37 -04:00
.eslintignore Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
.eslintrc.json Merge branch 'main' of https://github.com/snowball-tools/snowballtools-base into andrehadianto/design-system-components 2024-02-22 12:45:17 +07:00
.gitignore ignore backend env file and readme 2024-02-26 17:33:44 -05:00
.node-version Switch from cra to vite 2024-04-11 21:48:58 -05:00
.prettierignore Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
.prettierrc.json Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
package.json Support async express handlers 2024-06-19 22:59:20 -05:00
README.md Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
tsconfig.json Backend package with db models (#43) 2024-01-16 13:40:14 +05:30

Backend for Snowball Tools