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 member (eg "invite sent" state) in members list when inviting a new member via email #6055

Open
mxcrbn opened this issue Jun 27, 2024 · 1 comment

Comments

@mxcrbn
Copy link

mxcrbn commented Jun 27, 2024

Current behavior

When adding members via email, a toast message confirms the action but those members don't appear anywhere, which can be confusing (on perso & even more on team level).

Copy link

greptile-apps bot commented Jun 27, 2024

To add the invited member to the members list, follow these steps:

  1. Update WorkspaceInviteTeam component:

    • File: frontend/src/components/WorkspaceInviteTeam.tsx
    • After the invite action, update the state to include the invited member with an 'invite sent' status.
    const handleInvite = async (email: string) => {
      await inviteMember(email);
      setMembers([...members, { email, status: 'invite sent' }]);
    };
  2. Reflect state change in SettingsWorkspaceMembers component:

    • File: frontend/src/components/SettingsWorkspaceMembers.tsx
    • Ensure the component correctly displays members with the 'invite sent' status.
    const renderMember = (member) => {
      return (
        <div key={member.email}>
          {member.email} - {member.status}
        </div>
      );
    };
    • Map through the members state to render each member.
    return (
      <div>
        {members.map(renderMember)}
      </div>
    );

Edit Issue Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant