Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored Dec 15, 2020
1 parent aedd2ec commit b882414
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Add a new layout

Take a new layout named `secondary` as an example to make the route starting with `seconday` use this layout.
Take a new layout named `secondary` as an example to make the route starting with `secondary` use this layout.

1. Add related configuration in `src/utils/config.js`. For details, please refer to [layouts](/configuration?id=layouts).

Expand All @@ -11,11 +11,11 @@ Take a new layout named `secondary` as an example to make the route starting wit
           {
               name: 'primary',
               include: [/.*/],
               exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/seconday\/(.*)/],
               exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/secondary\/(.*)/],
           },
           {
               name: 'secondary',
               include: [/(\/(en|zh))*\/seconday\/(.*)/],
               include: [/(\/(en|zh))*\/secondary\/(.*)/],
           },
   ],
```
Expand All @@ -40,21 +40,21 @@ Take a new layout named `secondary` as an example to make the route starting wit
   export default ({ children }) => {
     Return (
       <div>
         <h1>Seconday</h1>
         <h1>Secondary</h1>
         {children}
       </div>
     )
   }
```

4. Add a `seconday/index.js` file to the `src/pages/` directory.
4. Add a `secondary/index.js` file to the `src/pages/` directory.

```javascript
   import React from 'react'

   export default ({ children }) => {
     Return <div>Seconday page Content</div>
     Return <div>Secondary page Content</div>
   }
```

5. Finally, start the development mode `npm run start`, open [http://localhost:7000/seconday/](http://localhost:7000/seconday/) and you will see the page for the `seconday` layout.
5. Finally, start the development mode `npm run start`, open [http://localhost:7000/secondary/](http://localhost:7000/secondary/) and you will see the page for the `secondary` layout.

0 comments on commit b882414

Please sign in to comment.