Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:resolved sign-up distortion[#2133] #86

Closed
wants to merge 6 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/pages/Auth/verify-email/VerifyEmail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
const verifyString = writable('');
let verifyLength: string = '';
let isRegistered = false;
let maxlength = 40;
let redirectRules = {
Copy link
Member

Choose a reason for hiding this comment

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

use

   const  MAX_LENGTH = 100;

Copy link
Author

Choose a reason for hiding this comment

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

okay

title: 'Welcome to Sparrow!',
description: 'Bridging Frontend and Backend Development.',
Expand Down Expand Up @@ -223,6 +224,14 @@
onCodeInput();
handleVerificationCode();
}
// This function will reduce the email size if it is too long.
function handleEmail(text:string,maxlength:number){
if(text.length > maxlength){
return text.slice(0, maxlength) + "..."
}
Copy link
Member

Choose a reason for hiding this comment

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

use arrow function here, return type is missing

Copy link
Author

Choose a reason for hiding this comment

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

I will fix it

return text
}
$: EmailText = handleEmail(emailText, maxlength);
Copy link
Member

Choose a reason for hiding this comment

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

variable name should be camel case.

Copy link
Author

Choose a reason for hiding this comment

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

I will change it.


let selectedInput = '';
const handleFocus = (inputId) => {
Expand Down Expand Up @@ -271,7 +280,7 @@
<div class="text-center sparrow-fs-14 sparrow-fs-300 mt-5">
<p class="sparrow-fs-12">
We have sent a magic code at <br />
<span class="email-text">{emailText}</span>
<span class="email-text">{EmailText}</span>
</p>
<div>
<div class="d-flex flex-column">
Expand Down
Loading