changed from hexo to custom react stuff #1

Merged
developomp merged 73 commits from dev into master 2021-06-27 14:37:56 +09:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 8263a76e41 - Show all commits

View file

@ -226,7 +226,7 @@ export default class App extends React.Component<AppProps, AppState> {
<NotFound />
</Route>
<Route exact path="/:path">
<Route exact path="/:path*">
{({ match }) => (
<Page key={match.params.path} />
)}

View file

@ -13,7 +13,7 @@ export default class Page extends React.Component {
constructor(props) {
super(props)
const fetched = pages[location.pathname]
const fetched = pages[location.pathname.replace(/\/$/, "")] // remove a trailing slash
if (!fetched) return
fetched.content = fetched?.content ? fetched.content : "No content"