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

feat: add email blocklist section with mocked data #3145

Merged

Conversation

lakshay-saini-au8
Copy link
Contributor

#2832

  1. Added Settings/Accounts/Emails page a "Blocklist" section with a title, a description, an input, an "Add to blocklist" button, and a table that displays blocked emails.
  2. Onclick "Add to blocklist" button add a row in a state local to the component for now.
Untitled_Project_V1.mp4

@lakshay-saini-au8
Copy link
Contributor Author

@thaisguigon @charlesBochet
Please review

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

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

@lakshay-saini-au8 Thank you very much for contributing. I left a couple of comments, but great work overall :)

Comment on lines 20 to 24
const updateBlockedEmailList = (email: string) =>
setBlockedEmailList((prevState) => [
...prevState,
{ id: v4(), email: email, blocked_at: '21/12/2023' },
]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Later we will need to check if the value email is indeed an email and we will also need to check if the email isn't already blocked.
I think that even if these are mock data, we could put the current date in blocked_at

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we can put the check later on once we integrate with the backend, also I didn't find any error state design for this in Figma.

<StyledContainer>
<StyledLinkContainer>
<TextInput
placeholder="eddy@gmail.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the Figma, the placeholder should be "eddy@gmail.com, @apple.com".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@lakshay-saini-au8
Copy link
Contributor Author

@bosiraphael Please review

Screenshot 2023-12-27 at 12 53 41 PM

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

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

LGTM, thank you !

@bosiraphael bosiraphael merged commit c08d8ef into twentyhq:main Dec 27, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants