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

Commit

Permalink
Docs: use isLoading instead of PageLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Nov 2, 2016
1 parent bda5dbd commit 5d8a602
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
6 changes: 0 additions & 6 deletions docs/content/loading.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ const Footer = () => (
>
{ "404" }
</Link>
{ ", " }
<Link
className={ styles.link }
to="/loading/"
>
{ "Loading" }
</Link>
</Banner>
</footer>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TopBarProgressIndicator.config({
shadowBlur: 5,
})

const PageLoading = () => (
const Loading = () => (
<div>
<Helmet
title={ "Loading..." }
Expand All @@ -29,4 +29,4 @@ const PageLoading = () => (
</div>
)

export default PageLoading
export default Loading
7 changes: 6 additions & 1 deletion docs/src/layouts/Page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Helmet from "react-helmet"
import invariant from "invariant"
import { joinUri, BodyContainer } from "phenomic"

import Loading from "../../components/Loading"
import EditThisPage from "../../components/EditThisPage"
import Banner from "../../components/Banner"
import ContentWrapper from "../../components/ContentWrapper"
Expand All @@ -11,6 +12,7 @@ import styles from "./index.css"

const Page = (
{
isLoading,
__filename,
__url,
head,
Expand Down Expand Up @@ -86,7 +88,9 @@ const Page = (
</div>
}
{
body &&
isLoading
? <Loading />
: body &&
<div className={ styles.content }>
<BodyContainer>{ body }</BodyContainer>
</div>
Expand All @@ -100,6 +104,7 @@ const Page = (

Page.propTypes = {
children: PropTypes.node,
isLoading: PropTypes.boolean,
__filename: PropTypes.string.isRequired,
__url: PropTypes.string.isRequired,
head: PropTypes.object.isRequired,
Expand Down
2 changes: 0 additions & 2 deletions docs/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { PageContainer as PhenomicPageContainer } from "phenomic"
import AppContainer from "./AppContainer.js"
import Page from "./layouts/Page"
import PageError from "./layouts/PageError"
import PageLoading from "./layouts/PageLoading"
import Homepage from "./layouts/Homepage"
import Showcase from "./components/Showcase"

Expand All @@ -15,7 +14,6 @@ const DocsPageContainer = (props) => (
layouts={{
Page,
PageError,
PageLoading,
Homepage,
}}
/>
Expand Down

0 comments on commit 5d8a602

Please sign in to comment.