Skip to content

Commit 33939b6

Browse files
authored
Add social media links in notification (#1144)
1 parent a99823e commit 33939b6

File tree

45 files changed

+68
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+68
-23
lines changed

src/main/webapp/app/components/Footer.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import { API_DOCUMENT_LINK, PAGE_ROUTE } from 'app/config/constants';
1212
import { Linkout } from 'app/shared/links/Linkout';
1313
import ExternalLinkIcon from 'app/shared/icons/ExternalLinkIcon';
1414
import { OncoTreeLink } from 'app/shared/utils/UrlUtils';
15+
import {
16+
LinkedInLink,
17+
TwitterLink,
18+
UserGoogleGroupLink,
19+
} from 'app/shared/links/SocialMediaLinks';
1520

1621
class Footer extends React.Component<{ lastDataUpdate: string }> {
1722
public get externalLinks() {
@@ -61,13 +66,8 @@ class Footer extends React.Component<{ lastDataUpdate: string }> {
6166
<div className={classnames(styles.footerAList)}>
6267
<Link to={PAGE_ROUTE.TERMS}>Terms of Use</Link>
6368
<ContactLink emailSubject={'Contact us'}>Contact Us</ContactLink>
64-
<a
65-
href="https://twitter.com/OncoKB"
66-
target="_blank"
67-
rel="noopener noreferrer"
68-
>
69-
Twitter
70-
</a>
69+
<LinkedInLink short />
70+
<TwitterLink short />
7171
<Linkout link={API_DOCUMENT_LINK}>API</Linkout>
7272
</div>
7373
<div className={classnames(styles.footerAList)}>

src/main/webapp/app/components/userMessager/UserMessage.tsx

+22-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ import { Link } from 'react-router-dom';
2121
import AppStore from 'app/store/AppStore';
2222
import { Linkout } from 'app/shared/links/Linkout';
2323
import { COLOR_BLACK, COLOR_DARK_BLUE, COLOR_WARNING } from 'app/config/theme';
24+
import {
25+
LinkedInLink,
26+
TwitterLink,
27+
UserGoogleGroupLink,
28+
} from 'app/shared/links/SocialMediaLinks';
2429

2530
export interface IUserMessage {
2631
dateStart?: number;
@@ -49,6 +54,22 @@ if (
4954
// ADD MESSAGE IN FOLLOWING FORMAT
5055
// UNIQUE ID IS IMPORTANT B/C WE REMEMBER A MESSAGE HAS BEEN SHOWN
5156
// BASED ON USERS LOCALSTORAGE
57+
{
58+
dateEnd: 1735689600000,
59+
content: (
60+
<div>
61+
<div>
62+
<span>
63+
Follow us on <LinkedInLink /> and <TwitterLink />, or subscribe to
64+
our{' '}
65+
<UserGoogleGroupLink>low-volume email list</UserGoogleGroupLink>,
66+
to stay updated on our latest data releases and new features!
67+
</span>
68+
</div>
69+
</div>
70+
),
71+
id: '2024-social-accounts-message',
72+
},
5273
{
5374
dateEnd: 1705276800000,
5475
content: (
@@ -67,7 +88,7 @@ if (
6788
id: '2023-holiday-message',
6889
},
6990
{
70-
dateEnd: 100000000000000,
91+
dateEnd: 1,
7192
content: (
7293
<div>
7394
<span>Check out our latest publication in Cancer Discovery, </span>

src/main/webapp/app/pages/newsPage/NewsPage.tsx

+8-15
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ import { GenePageLink, SopPageLink } from 'app/shared/utils/UrlUtils';
3232
import { Row } from 'react-bootstrap';
3333
import { FdaApprovalLink } from 'app/pages/newsPage/Links';
3434
import { LevelOfEvidencePageLink } from 'app/shared/links/LevelOfEvidencePageLink';
35+
import {
36+
LinkedInLink,
37+
TwitterLink,
38+
UserGoogleGroupLink,
39+
} from 'app/shared/links/SocialMediaLinks';
3540

3641
@inject('routing')
3742
@observer
@@ -71,21 +76,9 @@ export default class NewsPage extends React.Component<{
7176
</p>
7277
<p>
7378
<b>Stay tuned</b> for future data updates (improved annotations,
74-
new alterations), as well as new features. You can follow us on
75-
Twitter (
76-
<a
77-
href="https://twitter.com/OncoKB"
78-
target="_blank"
79-
rel="noopener noreferrer"
80-
>
81-
@OncoKB
82-
</a>
83-
) or subscribe to our{' '}
84-
<b>
85-
<Linkout link={ONCOKB_NEWS_GROUP_SUBSCRIPTION_LINK}>
86-
low-volume email list
87-
</Linkout>
88-
</b>{' '}
79+
new alterations), as well as new features. You can follow us on{' '}
80+
<LinkedInLink /> and <TwitterLink />, or subscribe to our{' '}
81+
<UserGoogleGroupLink>low-volume email list</UserGoogleGroupLink>{' '}
8982
for updates.
9083
</p>
9184
<CitationText />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react';
2+
import { Linkout } from 'app/shared/links/Linkout';
3+
import { ONCOKB_NEWS_GROUP_SUBSCRIPTION_LINK } from 'app/config/constants';
4+
5+
export const TwitterLink: React.FunctionComponent<{
6+
short?: boolean;
7+
}> = props => {
8+
return (
9+
<Linkout link={'https://twitter.com/OncoKB'}>
10+
Twitter{props.short ? '' : ' (@OncoKB)'}
11+
</Linkout>
12+
);
13+
};
14+
15+
export const LinkedInLink: React.FunctionComponent<{
16+
short?: boolean;
17+
}> = props => {
18+
return (
19+
<Linkout link={'https://www.linkedin.com/company/oncokb/'}>
20+
LinkedIn{props.short ? '' : ' (OncoKB)'}
21+
</Linkout>
22+
);
23+
};
24+
25+
export const UserGoogleGroupLink: React.FunctionComponent = props => {
26+
return (
27+
<Linkout link={ONCOKB_NEWS_GROUP_SUBSCRIPTION_LINK}>
28+
{props.children ? props.children : 'Email List'}
29+
</Linkout>
30+
);
31+
};

0 commit comments

Comments
 (0)