1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-10 17:24:02 +02:00

Load with correct starting example (#3220)

This commit is contained in:
Dylan Markow
2019-12-04 09:43:06 -06:00
committed by Ian Storm Taylor
parent f72ef80529
commit fe2cebb58f

View File

@@ -234,7 +234,7 @@ const ExamplePage = () => {
const [stacktrace, setStacktrace] = useState()
const [showTabs, setShowTabs] = useState()
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 [name, Component, path] = EXAMPLE
return (