-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use matchPath to trick reach router to match router (#11)
- Loading branch information
Showing
7 changed files
with
83 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
|
||
import Layout from '../components/layout'; | ||
import SEO from '../components/seo'; | ||
import PageList from '../components/pageList'; | ||
|
||
const ClientOnly = () => { | ||
const [text, setText] = useState(''); | ||
|
||
useEffect(() => { | ||
setText('hydrated'); | ||
}, []); | ||
|
||
return <span id="mytext">{text}</span>; | ||
}; | ||
|
||
const RandomPage = () => ( | ||
<Layout> | ||
<SEO title="Page random url" /> | ||
<h1 data-page="random">Hi from the random page</h1> | ||
<p>Welcome to a random page</p> | ||
<ClientOnly /> | ||
<PageList hidePage={5} /> | ||
</Layout> | ||
); | ||
|
||
export default RandomPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters