Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
38 changes: 20 additions & 18 deletions src/components/AccountNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,28 @@ export const AccountNotifications: FC<IAccountNotifications> = (
</div>
)}

{showAccountNotifications
? groupByRepository
? Object.values(groupedNotifications).map((repoNotifications) => {
const repoSlug = repoNotifications[0].repository.full_name;
{showAccountNotifications && (
<>
{groupByRepository
? Object.values(groupedNotifications).map((repoNotifications) => {
const repoSlug = repoNotifications[0].repository.full_name;

return (
<RepositoryNotifications
key={repoSlug}
repoName={repoSlug}
repoNotifications={repoNotifications}
return (
<RepositoryNotifications
key={repoSlug}
repoName={repoSlug}
repoNotifications={repoNotifications}
/>
);
})
: notifications.map((notification) => (
<NotificationRow
key={notification.id}
notification={notification}
/>
);
})
: notifications.map((notification) => (
<NotificationRow
key={notification.id}
notification={notification}
/>
))
: null}
))}
</>
)}
</>
);
};
8 changes: 3 additions & 5 deletions src/components/icons/AuthMethodIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ export interface IAuthMethodIcon {
export const AuthMethodIcon: FC<IAuthMethodIcon> = (props: IAuthMethodIcon) => {
return (
<span title={props.type} className="mr-1">
{props.type === 'GitHub App' ? <AppsIcon size={props.size} /> : null}
{props.type === 'Personal Access Token' ? (
<KeyIcon size={props.size} />
) : null}
{props.type === 'OAuth App' ? <PersonIcon size={props.size} /> : null}
{props.type === 'GitHub App' && <AppsIcon size={props.size} />}
{props.type === 'Personal Access Token' && <KeyIcon size={props.size} />}
{props.type === 'OAuth App' && <PersonIcon size={props.size} />}
</span>
);
};
8 changes: 3 additions & 5 deletions src/components/icons/PlatformIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ export interface IPlatformIcon {
export const PlatformIcon: FC<IPlatformIcon> = (props: IPlatformIcon) => {
return (
<span title={props.type} className="mr-1">
{props.type === 'GitHub Cloud' ? (
<MarkGithubIcon size={props.size} />
) : null}
{props.type === 'GitHub Enterprise Server' ? (
{props.type === 'GitHub Cloud' && <MarkGithubIcon size={props.size} />}
{props.type === 'GitHub Enterprise Server' && (
<ServerIcon size={props.size} />
) : null}
)}
</span>
);
};