Skip to content

Commit bb614f2

Browse files
committed
docs: update link to features
1 parent d260367 commit bb614f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/docs/src/templates/DocsLayout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@ const humanize = (text: string): string => {
6161

6262
const getDescription = (location: Location, description: string) => {
6363
if (location.pathname.includes('api') || location.pathname.includes('styling')) {
64-
const regex = /React\s[A-Z][A-Za-z]*/
64+
const regex = /React\s+(.*?)\s+component/
6565
const parts = description.split(regex)
6666
const matches = description.match(regex)
6767

68+
console.log('parts', parts)
69+
6870
if (matches && parts.length > 1) {
6971
return (
7072
<>
7173
{parts[0]}
72-
<Link to="../">{matches[0]}</Link>
73-
{parts[1]}
74+
<Link to="../">React {parts[1]}</Link> component
75+
{parts[2]}
7476
</>
7577
)
7678
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy