Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Disable homepage #24

Merged
merged 1 commit into from
Jun 21, 2017
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
7 changes: 3 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import "./App.css";

import { BrowserRouter as Router, Route } from "react-router-dom";
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";

import Footer from "./components/Footer";

Expand All @@ -11,8 +11,7 @@ import {
Rooms,
Room,
Hubs,
HubsDetails,
Home
HubsDetails
} from "./containers";

import pkg from "./../package.json";
Expand All @@ -23,7 +22,7 @@ class App extends Component {
<Router>
<div>
<div className="App">
<Route exact path="/" component={Home} />
<Route exact path="/" render={() => <Redirect to="/buildings" />} />
<Route exact path="/buildings" component={Buildings} />
<Route
exact
Expand Down
1 change: 0 additions & 1 deletion src/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Nav extends Component {
<div className="pt-navbar-heading">{this.state.name}</div>
</div>
<div className="pt-navbar-group pt-align-right">
<Link className="pt-button pt-minimal" to="/">Home</Link>
<Link className="pt-button pt-minimal" to="/buildings">
Buildings
</Link>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Nav.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ it("renders without crashing", () => {
);
});

it("shows 3 links", () => {
it("shows 2 links", () => {
const nav = shallow(<Nav />);
expect(nav.find("Link")).toHaveLength(3);
expect(nav.find("Link")).toHaveLength(2);
});