Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update navigation #90

Merged
merged 3 commits into from
Jun 26, 2018
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
14 changes: 0 additions & 14 deletions src/components/About.jsx

This file was deleted.

4 changes: 1 addition & 3 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import GrommetApp from 'grommet/components/App';
import Header from 'grommet/components/Header';
Expand All @@ -12,8 +11,7 @@ function App(props) {
return (
<GrommetApp>
<Header className="site-header">
<h1 className="title">Pandora</h1>
<Link to="/about" className="link">About</Link>
<h1 className="title">Translate your projects</h1>
<AuthContainer />
</Header>
<Section className="content-section">
Expand Down
9 changes: 8 additions & 1 deletion src/containers/ProjectDashboardContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router';
import LanguageSelector from '../components/LanguageSelector';
import { fetchProject, addLanguage, setLanguage, fetchLanguages } from '../ducks/project';
import { createTranslation } from '../ducks/resource';
Expand Down Expand Up @@ -46,7 +47,13 @@ class ProjectDashboardContainer extends Component {
.filter(option => (option.value !== project.primary_language));
return (
<div>
<h2>Project Dashboard</h2>
<h2>
<Link
to={`/project/${project.id}`}
>
{project.display_name}
</Link>
</h2>
<LanguageSelector languages={projectLanguages} value={language} onChange={this.onChangeLanguage} />
{language &&
<p className="preview">
Expand Down
2 changes: 0 additions & 2 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Provider } from 'react-redux';
import oauth from 'panoptes-client/lib/oauth';

import App from './components/App';
import About from './components/About';
import config from './constants/config';
import configureStore from './store';
import ProjectContentsContainer from './containers/ProjectContentsContainer';
Expand Down Expand Up @@ -33,7 +32,6 @@ oauth.init(config.panoptesAppId)
<Route path=":resource_id" component={Resource} />
</Route>
</Route>
<Route path="/about" component={About} />
</Route>
</Router>
</Provider>),
Expand Down
27 changes: 0 additions & 27 deletions test/components/About.test.jsx

This file was deleted.