import * as React from 'react'; import _ from 'lodash'; import { observer } from 'mobx-react'; import { TypeOfCancer as CancerType } from 'cbioportal-ts-api-client'; import Testimonials from '../testimonials/Testimonials'; import { getServerConfig } from 'config/config'; import { QueryStore } from 'shared/components/query/QueryStore'; import { Link } from 'react-router-dom'; import LoadingIndicator from '../loadingIndicator/LoadingIndicator'; import { buildCBioPortalPageUrl } from '../../api/urls'; import { ResultsViewTab } from '../../../pages/resultsView/ResultsViewPageHelpers'; interface IRightBarProps { queryStore: QueryStore; } interface IRightBarState { twitterLoading: boolean; } @observer export default class RightBar extends React.Component< IRightBarProps, IRightBarState > { constructor(props: IRightBarProps) { super(props); this.state = { twitterLoading: true, // only used for default what's new }; } get studyStore() { return this.props.queryStore; } get logic() { return this.studyStore.studyListLogic; } private CancerTypeList() { return this.logic.cancerTypeListView.getChildCancerTypes( this.studyStore.treeData.rootCancerType, true ); } private CancerTypeDescendantStudy({ cancerType, }: { cancerType: CancerType; }) { return this.logic.cancerTypeListView.getDescendantCancerStudies( cancerType ); } private CancerTypeDescendantStudies(cancerList: CancerType[]) { return cancerList .filter( cancer => cancer.cancerTypeId !== 'other' && cancer.cancerTypeId !== 'mixed' ) .map((filteredCancer: CancerType) => ({ shortName: filteredCancer.name, color: filteredCancer.dedicatedColor, studies: this.CancerTypeDescendantStudy({ cancerType: filteredCancer, }), })); } private getWhatsNew() { if (getServerConfig().skin_right_nav_show_whats_new) { if (!_.isEmpty(getServerConfig().skin_right_nav_whats_new_blurb)) { return (
Sign up for low-volume email news alerts
SubscribeAre you running a local instance of cBioPortal, public or private?{' '} Complete the survey here {' '} to add your installation to the map.