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

Hide Navigation Tabs if Single connected Account #6267

Closed
Bonapara opened this issue Jul 15, 2024 · 6 comments
Closed

Hide Navigation Tabs if Single connected Account #6267

Bonapara opened this issue Jul 15, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers scope: front Issues that are affecting the frontend side only

Comments

@Bonapara
Copy link
Member

Bonapara commented Jul 15, 2024

We should hide the navigation tabs that allow switching between different email/calendar accounts when the user has only connected one account:

image

CleanShot 2024-07-15 at 17 01 58

@Bonapara Bonapara added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: minutes labels Jul 15, 2024
@Bonapara Bonapara changed the title Hide Navigation Tabs if Single Email Account Hide Navigation Tabs if Single connected Account Jul 15, 2024
Copy link
Contributor

greptile-apps bot commented Jul 15, 2024

Modify SettingsAccountsMessageChannelsContainer to conditionally render TabList only if there are multiple email accounts.

export const SettingsAccountsMessageChannelsContainer = () => {
  // ... existing code ...

  if (!messageChannels.length) {
    return <SettingsAccountsListEmptyStateCard />;
  }

  const hasMultipleAccounts = accounts.length > 1;

  return (
    <>
      {hasMultipleAccounts && (
        <TabList
          tabListId={SETTINGS_ACCOUNT_MESSAGE_CHANNELS_TAB_LIST_COMPONENT_ID}
          tabs={tabs}
        />
      )}
      {messageChannels.map((messageChannel) => (
        <React.Fragment key={messageChannel.id}>
          {messageChannel.id === activeTabId && (
            <SettingsAccountsMessageChannelDetails
              messageChannel={messageChannel}
            />
          )}
        </React.Fragment>
      ))}
    </>
  );
};

References

/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsx
/packages/twenty-front/src/modules/ui/layout/tab/components/TabList.tsx

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Ask Greptile · Edit Issue Bot Settings

@adithej
Copy link
Contributor

adithej commented Jul 15, 2024

Hi, I am interested in working on this, please assign me

@Bonapara
Copy link
Member Author

Sure @adithej, thanks for contributing!

@ViditJain123
Copy link

I have created a pull request addressing this issue here

@charlesBochet charlesBochet moved this from 🆕 New to 🔖 Planned in Product development ✅ Jul 16, 2024
@charlesBochet charlesBochet moved this from 🔖 Planned to ✅ Done in Product development ✅ Jul 19, 2024
@prateekj117
Copy link
Contributor

@charlesBochet CMIIR, but I think we can close this one as the related MR is already merged.

@adithej
Copy link
Contributor

adithej commented Jul 31, 2024

Yes , it's been merged , refer : #6274

@Bonapara Bonapara closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers scope: front Issues that are affecting the frontend side only
Projects
Archived in project
Development

No branches or pull requests

4 participants