mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-15 01:33:40 +00:00
feat: pluralize things in lists
This commit is contained in:
parent
23f43045c4
commit
505673acd7
3 changed files with 12 additions and 3 deletions
quartz/components/pages
|
@ -7,6 +7,7 @@ import style from "../styles/listPage.scss"
|
|||
import { PageList } from "../PageList"
|
||||
import { _stripSlashes, simplifySlug } from "../../util/path"
|
||||
import { Root } from "hast"
|
||||
import { pluralize } from "../../util/lang"
|
||||
|
||||
function FolderContent(props: QuartzComponentProps) {
|
||||
const { tree, fileData, allFiles } = props
|
||||
|
@ -36,7 +37,7 @@ function FolderContent(props: QuartzComponentProps) {
|
|||
<article>
|
||||
<p>{content}</p>
|
||||
</article>
|
||||
<p>{allPagesInFolder.length} items under this folder.</p>
|
||||
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
|
||||
<div>
|
||||
<PageList {...listProps} />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue