Skip to content

Commit

Permalink
Add LinkedIn link to item details view (#563)
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg authored Apr 11, 2024
1 parent 7b0a161 commit 89c2890
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions web/src/layout/common/itemModal/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ const Content = (props: Props) => {
})
);

const getLinkedInUrl = (): string | null => {
if (itemInfo()) {
if (itemInfo()!.linkedin_url) {
return itemInfo()!.linkedin_url!;
} else {
if (itemInfo()!.crunchbase_data && itemInfo()!.crunchbase_data!.linkedin_url) {
return itemInfo()!.crunchbase_data!.linkedin_url!;
}
}
}
return null;
};

return (
<>
<ItemDropdown itemId={itemInfo()!.id} />
Expand Down Expand Up @@ -184,6 +197,12 @@ const Content = (props: Props) => {
</ExternalLink>
</Show>

<Show when={!isNull(getLinkedInUrl())}>
<ExternalLink title="LinkedIn" class={`ms-3 ${styles.link}`} href={getLinkedInUrl()!}>
<SVGIcon kind={SVGIconKind.LinkedIn} />
</ExternalLink>
</Show>

<Show when={!isUndefined(itemInfo()!.slack_url)}>
<ExternalLink title="Slack" class={`ms-3 ${styles.link}`} href={itemInfo()!.slack_url!}>
<SVGIcon kind={SVGIconKind.Slack} />
Expand Down
1 change: 1 addition & 0 deletions web/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export interface Item extends BaseItem {
twitter_url?: string;
unnamed_organization?: boolean;
youtube_url?: string;
linkedin_url?: string;
audits?: SecurityAudit[];
}

Expand Down

0 comments on commit 89c2890

Please sign in to comment.