Skip to content

Commit

Permalink
Merge pull request #97 from geotrev/develop
Browse files Browse the repository at this point in the history
Optimization release
  • Loading branch information
geotrev committed Oct 21, 2018
2 parents 4dace1d + c304caa commit 55a9a3e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/Docs/DocsRoutes/DocsRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ChevronRight from "react-feather/dist/icons/chevron-right"

function getRoute(name) {
return Loadable({
loader: () => import(`./articles/${name}.js`),
loader: () => import(`./articles/${name}`),
loading: () => <LoadingSpinner />,
})
}
Expand Down
7 changes: 7 additions & 0 deletions src/pages/Home/Badges.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react"
import Markdown from "react-markdown"
import statusBadges from "./badges.md"

const Badges = () => <Markdown source={statusBadges} escapeHtml={false} />

export default Badges
9 changes: 7 additions & 2 deletions src/pages/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@ import React, { Component } from "react"
import { Link } from "react-router-dom"
import Prism from "prismjs"
import Markdown from "react-markdown"
import Loadable from "react-loadable"
import ChevronRight from "react-feather/dist/icons/chevron-right"
import "./Home.scss"

import { ScrollUpOnMount } from "helpers"
import { downloadPath, introductionPath } from "routes"

import pkg from "../../../package.json"
import statusBadges from "./badges.md"
import installNpm from "./install-npm.md"
import installAssets from "./install-assets.md"
import tinySvg from "assets/images/tiny.svg"
import modSvg from "assets/images/modular.svg"
import configSvg from "assets/images/configurable.svg"
import a11ySvg from "assets/images/accessible.svg"

const StatusBadges = Loadable({
loader: () => import("./Badges"),
loading: () => <span className="is-visually-hidden">Loading badges</span>,
})

export default class Home extends Component {
constructor() {
super()
Expand Down Expand Up @@ -54,7 +59,7 @@ export default class Home extends Component {
</div>

<div className="xsmall-12 columns badges">
<Markdown source={statusBadges} escapeHtml={false} />
<StatusBadges />
</div>
</div>
</div>
Expand Down

0 comments on commit 55a9a3e

Please sign in to comment.