diff --git a/components/Layout.js b/components/Layout.js index 2ad5e0f..9e45215 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -1,24 +1,12 @@ -import React, { PureComponent, Component } from "react"; +import React, { PureComponent } from "react"; import isBrowser from "is-in-browser"; import Link from "next/link"; -import Head from "next/head"; -import NProgress from "nprogress"; import Router from "next/router"; import GithubCorner from "react-github-corner"; import FuzzyPicker, { FuzzyWrapper } from "react-fuzzy-picker"; import Collapse, { Panel } from "rc-collapse"; import findIndex from "lodash/findIndex"; -import { categorizedRoutes, routes, activeRouteData } from "../utils/routes"; - -NProgress.configure({ showSpinner: false }); - -Router.onRouteChangeStart = url => { - if (url.indexOf("code=") === -1) { - NProgress.start(); - } -}; -Router.onRouteChangeComplete = () => NProgress.done(); -Router.onRouteChangeError = () => NProgress.done(); +import { categorizedRoutes, routes } from "../utils/routes"; function Logo() { return ( @@ -94,7 +82,6 @@ export default class Layout extends PureComponent { } componentDidMount() { - routes.forEach(({ path }) => Router.prefetch(path)); Layout.loadCarbonAds(); } @@ -129,44 +116,8 @@ export default class Layout extends PureComponent { }; render() { - const { label, desc, title } = activeRouteData(this.props.pathname); - return (
- - {title || label} - - - - - - - - - - - - - - - - - - -