dashboard/docusaurus/docs/code-base-works/routes.md

22 lines
529 B
Markdown

# Routes
## Location
The core dashboard routes are defined in `shell/nuxt/router.js`.
## Notes
This file was generated by nuxt and will soon be redefined by hand. It's safe to add new routes to this file.
## Pattern
First instantiate a page component at the top of the file. Then define a new route at the bottom of the file by giving the page component a unique path and name
```js
const about = () => interopDefault(import('../pages/about.vue'))
...
{
path: "/about",
component: about,
name: "about"
}
...
```