From ae5e6e1139cfde9b99ef47d496b049fc0f75439f Mon Sep 17 00:00:00 2001 From: Sing Date: Tue, 12 Mar 2019 23:39:33 +0800 Subject: [PATCH] Use hashRouter instead of browseRouter, Fix #2 Use hashRouter instead of browseRouter, Fix #2 --- package.json | 2 +- src/App.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c4b8ed4..0a7a442 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "junk-encoder", "version": "0.1.0", "private": true, - "homepage": "/junk-encoder/", + "homepage": "https://www.paddingleft.com/junk-encoder", "dependencies": { "bootstrap": "^4.3.1", "hi-base64": "^0.2.1", diff --git a/src/App.js b/src/App.js index 24e3f36..5cbf676 100644 --- a/src/App.js +++ b/src/App.js @@ -1,10 +1,9 @@ import React, { Component } from 'react'; import './App.css' import 'bootstrap/dist/css/bootstrap.css'; -import { BrowserRouter as Router, Route, NavLink } from "react-router-dom"; +import { HashRouter as Router, Route, NavLink } from "react-router-dom"; import EncodeForm from './components/encodeForm' import DecodeForm from './components/decodeForm' -import { homepage } from '../package.json' class App extends Component { constructor(props) { @@ -20,7 +19,7 @@ class App extends Component { render() { return ( - +