mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
Load with correct starting example (#3220)
This commit is contained in:
committed by
Ian Storm Taylor
parent
f72ef80529
commit
fe2cebb58f
@@ -234,7 +234,7 @@ const ExamplePage = () => {
|
|||||||
const [stacktrace, setStacktrace] = useState()
|
const [stacktrace, setStacktrace] = useState()
|
||||||
const [showTabs, setShowTabs] = useState()
|
const [showTabs, setShowTabs] = useState()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { example = 'rich-text' } = router.query
|
const { example = router.asPath.replace('/examples/', '') } = router.query
|
||||||
const EXAMPLE = EXAMPLES.find(e => e[2] === example)
|
const EXAMPLE = EXAMPLES.find(e => e[2] === example)
|
||||||
const [name, Component, path] = EXAMPLE
|
const [name, Component, path] = EXAMPLE
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user