Skip to content

feat(site): add an organization switcher to the user menu #13269

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

Merged
merged 7 commits into from
May 15, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix divider spacing
  • Loading branch information
aslilac committed May 14, 2024
commit 063f39420bf27371835c8191f5942da9f13dba58
Original file line number Diff line number Diff line change
Expand Up @@ -135,41 +135,42 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
<Divider css={{ marginBottom: 8 }} />

{organizations && (
<div>
<div
css={{
padding: "8px 20px 6px",
textTransform: "uppercase",
letterSpacing: 1.1,
lineHeight: 1.1,
fontSize: "0.8em",
}}
>
My teams
</div>
{organizations.map((org) => (
<MenuItem
key={org.id}
css={styles.menuItem}
onClick={() => {
setOrganizationId?.(org.id);
popover.setIsOpen(false);
<>
<div>
<div
css={{
padding: "8px 20px 6px",
textTransform: "uppercase",
letterSpacing: 1.1,
lineHeight: 1.1,
fontSize: "0.8em",
}}
>
{/* <LogoutIcon css={styles.menuItemIcon} /> */}
<Stack direction="row" spacing={1} css={styles.menuItemText}>
{org.name}
{organizationId === org.id && (
<span css={{ fontSize: 12, color: "gray" }}>Current</span>
)}
</Stack>
</MenuItem>
))}
</div>
My teams
</div>
{organizations.map((org) => (
<MenuItem
key={org.id}
css={styles.menuItem}
onClick={() => {
setOrganizationId?.(org.id);
popover.setIsOpen(false);
}}
>
{/* <LogoutIcon css={styles.menuItemIcon} /> */}
<Stack direction="row" spacing={1} css={styles.menuItemText}>
{org.name}
{organizationId === org.id && (
<span css={{ fontSize: 12, color: "gray" }}>Current</span>
)}
</Stack>
</MenuItem>
))}
</div>
<Divider css={{ marginTop: 8, marginBottom: 8 }} />
</>
)}

<Divider css={{ marginTop: organizations ? 8 : 0, marginBottom: 8 }} />

<Link to="/settings/account" css={styles.link}>
<MenuItem css={styles.menuItem} onClick={onPopoverClose}>
<AccountIcon css={styles.menuItemIcon} />
Expand Down
Loading