@frontity/mars-theme
Advanced tools
Comparing version 0.1.7 to 0.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.2.0](https://github.com/frontity/frontity/compare/@frontity/mars-theme@0.1.7...@frontity/mars-theme@0.2.0) (2019-05-16) | ||
### Features | ||
* **mars-theme:** add 404 page ([#64](https://github.com/frontity/frontity/issues/64)) ([cf7cce5](https://github.com/frontity/frontity/commit/cf7cce5)) | ||
## [0.1.7](https://github.com/frontity/frontity/compare/@frontity/mars-theme@0.1.6...@frontity/mars-theme@0.1.7) (2019-05-16) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@frontity/mars-theme", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "A starter theme for Frontity", | ||
@@ -28,5 +28,5 @@ "keywords": [ | ||
"@frontity/source": "^0.1.2", | ||
"frontity": "^0.2.6" | ||
"frontity": "^0.2.7" | ||
}, | ||
"gitHead": "f7eab4e5094d238a1dff506c23b4ae343537eb22" | ||
"gitHead": "a3b1c41b13d85ab5cc14d9a8d764552fe1cc5072" | ||
} |
import React from "react"; | ||
import { connect, styled } from "frontity"; | ||
import List from "./list"; | ||
@@ -13,4 +14,5 @@ const Post = ({ state, actions }) => { | ||
// Prefetch home posts if they are not fetched yet. | ||
// Prefetch home posts and the list component. | ||
actions.source.fetch("/"); | ||
List.preload(); | ||
@@ -17,0 +19,0 @@ return data.isReady ? ( |
@@ -6,2 +6,3 @@ import React from "react"; | ||
import Post from "./post"; | ||
import Page404 from "./page404.js"; | ||
@@ -34,2 +35,3 @@ const globalStyles = css` | ||
{state.source.data(state.router.path).isPostType && <Post />} | ||
{state.source.data(state.router.path).is404 && <Page404 />} | ||
</Body> | ||
@@ -36,0 +38,0 @@ </> |
21678
14
335