Commit 0aa7e34a authored by Imran Salam's avatar Imran Salam
Browse files

enable homepage link

parent 50b88457
import React, { Component, Fragment, lazy, Suspense } from 'react';
import { Route, RouteComponentProps, withRouter } from 'react-router';
import { Route, RouteComponentProps, Switch, withRouter } from 'react-router';
import { connect } from 'react-redux';
import { changeCurrentApp } from 'src/header/headerActions';
......@@ -30,6 +30,10 @@ export class App extends Component<AppProps> {
this.updateCurrentApp();
}
public componentWillUnmount() {
this.props.changeCurrentApp('');
}
public render() {
const { url } = this.props.match;
......@@ -37,9 +41,14 @@ export class App extends Component<AppProps> {
<Fragment>
<AppBar />
<Suspense fallback={<div>Loading...</div>}>
<Route path={`${url}/global-search`} component={GlobalSearch} />
<Route path={`${url}/species-selector`} component={SpeciesSelector} />
<Route path={`${url}/browser`} component={Browser} />
<Switch>
<Route path={`${url}/global-search`} component={GlobalSearch} />
<Route
path={`${url}/species-selector`}
component={SpeciesSelector}
/>
<Route path={`${url}/browser`} component={Browser} />
</Switch>
</Suspense>
</Fragment>
);
......
......@@ -12,6 +12,10 @@
display: inline-block;
font-size: 14px;
font-weight: $global-weight-bold;
a {
color: $ens-white;
}
}
.strapline,
......@@ -20,7 +24,7 @@
font-size: 11px;
margin-left: 30px;
@include breakpoint(960px) {
@include breakpoint(medium) {
display: inline-block;
}
}
import React, { memo, FunctionComponent } from 'react';
import { Link } from 'react-router-dom';
import HeaderButtons from './header-buttons/HeaderButtons';
import LaunchbarContainer from './launchbar/LaunchbarContainer';
......@@ -12,7 +13,9 @@ export const Header: FunctionComponent<HeaderProps> = () => (
<header>
<div className={styles.topBar}>
<div>
<div className={styles.companyText}>Ensembl</div>
<div className={styles.companyText}>
<Link to="/">Ensembl</Link>
</div>
<div className={styles.strapline}>Pre-release - March 2019</div>
<div className={styles.copyright}>
<a href="https://www.ebi.ac.uk">&copy; EMBL-EBI</a>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment