Skip to content

Commit

Permalink
feat: my pull requests
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy committed Sep 16, 2024
1 parent a3d4ee0 commit 1519f35
Show file tree
Hide file tree
Showing 5 changed files with 598 additions and 266 deletions.
38 changes: 28 additions & 10 deletions src/components/AccountNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import { IconButton } from '@atlaskit/button/new';
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
import ChevronLeftIcon from '@atlaskit/icon/glyph/chevron-left';
import ChevronUpIcon from '@atlaskit/icon/glyph/chevron-up';
import { Box, Flex, Stack } from '@atlaskit/primitives';
import { Box, Flex, Inline, Stack } from '@atlaskit/primitives';
import Tooltip from '@atlaskit/tooltip';

import { AppContext } from '../context/App';
import type { Account, AtlasifyError, AtlasifyNotification } from '../types';
import { openAccountProfile } from '../utils/links';
import { openAccountProfile, openMyPullRequests } from '../utils/links';
import { AllRead } from './AllRead';
import { NotificationRow } from './NotificationRow';
import { Oops } from './Oops';
import { ProductNotifications } from './ProductNotifications';
import { BitbucketIcon } from '@atlaskit/logo';
interface IAccountNotifications {
account: Account;
notifications: AtlasifyNotification[];
Expand Down Expand Up @@ -98,14 +99,31 @@ export const AccountNotifications: FC<IAccountNotifications> = (
/>
</Tooltip>

<IconButton
label={toggleAccountNotificationsLabel}
title={toggleAccountNotificationsLabel}
icon={ChevronIcon}
shape="circle"
spacing="compact"
appearance="subtle"
/>
<Inline space="space.100">
<IconButton
label="My pull requests"
title="My pull requests"
icon={(iconProps) => (
<BitbucketIcon {...iconProps} size="xsmall" />
)}
shape="circle"
spacing="compact"
appearance="subtle"
onClick={(event: MouseEvent<HTMLElement>) => {
// Don't trigger onClick of parent element.
event.stopPropagation();
openMyPullRequests();
}}
/>
<IconButton
label={toggleAccountNotificationsLabel}
title={toggleAccountNotificationsLabel}
icon={ChevronIcon}
shape="circle"
spacing="compact"
appearance="subtle"
/>
</Inline>
</Flex>
</Box>

Expand Down
Loading

0 comments on commit 1519f35

Please sign in to comment.