Skip to content

Commit

Permalink
Use hashRouter instead of browseRouter, Fix #2
Browse files Browse the repository at this point in the history
Use hashRouter instead of browseRouter, Fix #2
  • Loading branch information
Asing1001 committed Mar 12, 2019
1 parent 7e83d27 commit ae5e6e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 2 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -20,7 +19,7 @@ class App extends Component {

render() {
return (
<Router basename={homepage}>
<Router basename="/">
<div className="container">
<nav className="nav nav-pills nav-justified" style={{ padding: '1em' }}>
<NavLink exact className="nav-item nav-link" to="/">編碼</NavLink>
Expand Down

0 comments on commit ae5e6e1

Please sign in to comment.