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

Commit

Permalink
Merge pull request #24 from Badmuts/disable-home
Browse files Browse the repository at this point in the history
Disable homepage
  • Loading branch information
brandonvanwijk authored Jun 21, 2017
2 parents 9187af7 + da5a987 commit 983a790
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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);
});

0 comments on commit 983a790

Please sign in to comment.