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

add task solution #2118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add task solution #2118

wants to merge 2 commits into from

Conversation

dyarechuk
Copy link

Copy link

@avakiel avakiel left a comment

Choose a reason for hiding this comment

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

Nice job!

Copy link

@olya-shyian olya-shyian left a comment

Choose a reason for hiding this comment

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

Good work!
Try to fix one bug, inputs with url don't show error massage when I write not valid url...and as a result a user will not understand why 'add' button is still disabled

image

@dyarechuk
Copy link
Author

Good work!
Try to fix one bug, inputs with url don't show error massage when I write not valid url...and as a result a user will not understand why 'add' button is still disabled

image

So, if url is not valid, this textfield has to highlight with red color and show a title, right?

@dyarechuk dyarechuk requested a review from olya-shyian January 23, 2024 21:51
Copy link

@DanilWeda DanilWeda left a comment

Choose a reason for hiding this comment

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

Good job!
Approved with small comments.
Many thanks!

// eslint-disable-next-line max-len
const pattern = /^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@,.\w_]*)#?(?:[,.!/\\\w]*))?)$/;

type Props = {

Choose a reason for hiding this comment

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

Suggested change
type Props = {
interface Props = {

use interface prefer

Comment on lines +19 to +21
const isUrlValid = (url: string) => {
return pattern.test(url);
};

Choose a reason for hiding this comment

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

you can move it outside component file

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.

4 participants