From 11518556bdfd3b2ad285c2154d333afa9bfb12c9 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Sun, 17 Jun 2018 21:50:22 -0400 Subject: [PATCH 1/2] Use hash router in Library component --- core/__tests__/__snapshots__/Library.js.snap | 16 +++++++++++++--- core/examples/Library.js | 4 +--- core/src/Library.js | 9 +++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/core/__tests__/__snapshots__/Library.js.snap b/core/__tests__/__snapshots__/Library.js.snap index c646a8eb..a36e9f09 100644 --- a/core/__tests__/__snapshots__/Library.js.snap +++ b/core/__tests__/__snapshots__/Library.js.snap @@ -19,8 +19,9 @@ exports[`Library renders 1`] = ` class="nanolgtq4w" > Kit @@ -33,7 +34,16 @@ exports[`Library renders 1`] = `
+ > +
+ +
diff --git a/core/examples/Library.js b/core/examples/Library.js index ab806e29..3140ee00 100644 --- a/core/examples/Library.js +++ b/core/examples/Library.js @@ -38,9 +38,7 @@ import { const Demo = props => ( - + {/* renders in iframe when useFrame is true */} diff --git a/core/src/Library.js b/core/src/Library.js index 913d0fea..c47a98ba 100644 --- a/core/src/Library.js +++ b/core/src/Library.js @@ -2,8 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import nano from 'nano-style' import { - BrowserRouter, - StaticRouter, + HashRouter, Route, NavLink, Link, @@ -64,16 +63,14 @@ const NavItem = nano(NavLink)({ } }) -const Router = typeof document !== 'undefined' ? BrowserRouter : StaticRouter - export class Library extends React.Component { render() { const { basename, ...props } = this.props return ( - + - + ) } } From 85cbf65751b6c59369bc7678ae110d46693bf990 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Mon, 18 Jun 2018 12:27:37 -0400 Subject: [PATCH 2/2] Update snapshots --- core/__tests__/__snapshots__/Matrix.js.snap | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/core/__tests__/__snapshots__/Matrix.js.snap b/core/__tests__/__snapshots__/Matrix.js.snap index a685ed09..1fc53ff4 100644 --- a/core/__tests__/__snapshots__/Matrix.js.snap +++ b/core/__tests__/__snapshots__/Matrix.js.snap @@ -10,7 +10,7 @@ exports[`Matrix renders all examples 1`] = ` w="512" >