44 */
55
66/**
7- * @typedef Props
8- * Props .
7+ * @typedef Properties
8+ * Properties .
99 * @property {string } name
1010 * Name.
1111 * @property {Readonly<URL> } ghUrl
1212 * GitHub URL.
1313 * @property {Readonly<DataMeta> | undefined } [meta]
1414 * Meta.
15- * @property {Readonly<Item> } navTree
15+ * @property {Readonly<Item> } navigationTree
1616 * Navigation tree.
1717 * @property {JSX.Element } children
1818 * Children.
1919 */
2020
2121import React from 'react'
2222import { FootSite } from './foot-site.jsx'
23- import { NavSite , NavSiteSkip } from './nav-site.jsx'
23+ import { NavigationSite , NavigationSiteSkip } from './nav-site.jsx'
2424import { sortItems } from './sort.js'
2525
2626const dateTimeFormat = new Intl . DateTimeFormat ( 'en' , { dateStyle : 'long' } )
2727
2828/**
29- * @param {Readonly<Props > } props
30- * Props .
29+ * @param {Readonly<Properties > } properties
30+ * Properties .
3131 * @returns {JSX.Element }
3232 * Element.
3333 */
34- export function Layout ( props ) {
35- const { ghUrl, name, navTree} = props
36- const [ self , parent ] = findSelfAndParent ( navTree ) || [ ]
37- const navSortItems = parent ? parent . data . navSortItems : undefined
34+ export function Layout ( properties ) {
35+ const { ghUrl, name, navigationTree} = properties
36+ const [ self , parent ] = findSelfAndParent ( navigationTree ) || [ ]
37+ const navigationSortItems = parent
38+ ? parent . data . navigationSortItems
39+ : undefined
3840 const siblings = parent
3941 ? sortItems (
4042 parent . children ,
41- typeof navSortItems === 'string' ? navSortItems : undefined
43+ typeof navigationSortItems === 'string'
44+ ? navigationSortItems
45+ : undefined
4246 )
4347 : [ ]
44- const meta = ( self ? self . data . meta : props . meta ) || { }
48+ const meta = ( self ? self . data . meta : properties . meta ) || { }
4549 const index = self ? siblings . indexOf ( self ) : - 1
4650 const previous = index === - 1 ? undefined : siblings [ index - 1 ]
4751 const next = index === - 1 ? undefined : siblings [ index + 1 ]
@@ -50,10 +54,10 @@ export function Layout(props) {
5054 self
5155 ? accumulateReadingTime ( self )
5256 : meta . readingTime
53- ? Array . isArray ( meta . readingTime )
54- ? meta . readingTime
55- : [ meta . readingTime , meta . readingTime ]
56- : [ ]
57+ ? Array . isArray ( meta . readingTime )
58+ ? meta . readingTime
59+ : [ meta . readingTime , meta . readingTime ]
60+ : [ ]
5761 ) . map ( function ( d ) {
5862 return d > 15 ? Math . round ( d / 5 ) * 5 : Math . ceil ( d )
5963 } )
@@ -67,7 +71,7 @@ export function Layout(props) {
6771 }
6872
6973 const up =
70- parent && self && parent !== navTree ? (
74+ parent && self && parent !== navigationTree ? (
7175 < div >
7276 < a href = { parent . name } > { entryToTitle ( parent ) } </ a >
7377 { ' / ' }
@@ -140,8 +144,8 @@ export function Layout(props) {
140144 const href = d . github
141145 ? 'https://github.com/' + d . github
142146 : d . twitter
143- ? 'https://twitter.com/' + d . twitter
144- : d . url || undefined
147+ ? 'https://twitter.com/' + d . twitter
148+ : d . url || undefined
145149 return (
146150 < span key = { d . name } >
147151 { i ? ', ' : '' }
@@ -187,15 +191,15 @@ export function Layout(props) {
187191
188192 return (
189193 < div className = "page doc" >
190- < NavSiteSkip />
194+ < NavigationSiteSkip />
191195 < main >
192196 < article >
193197 { header ? (
194198 < header className = "content" >
195199 < div className = "block head-article" > { header } </ div >
196200 </ header >
197201 ) : undefined }
198- < div className = "content body" > { props . children } </ div >
202+ < div className = "content body" > { properties . children } </ div >
199203 { footer || tail ? (
200204 < footer className = "content" >
201205 < div className = "block foot-article" >
@@ -207,7 +211,7 @@ export function Layout(props) {
207211 </ article >
208212 < FootSite />
209213 </ main >
210- < NavSite name = { name } navTree = { navTree } />
214+ < NavigationSite name = { name } navigationTree = { navigationTree } />
211215 </ div >
212216 )
213217
0 commit comments