diff --git a/src/components/header.tsx b/src/components/header.tsx index e121dca1f7..e46d53ecaa 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -262,7 +262,7 @@ const MenuItem = ({ componentToShow, type, text, link }: MenuItemProps) => { {showExpanded && componentToShow} ) : ( - +
{text} @@ -314,7 +314,7 @@ const HeaderSec = ({ headerProps, wide }: HeaderViewProps) => { return ( { {/*
{externalLinkItems.map((item) => ( - + {item.text}    diff --git a/src/components/link.tsx b/src/components/link.tsx index 3e5d080ba4..ed1cc259f7 100644 --- a/src/components/link.tsx +++ b/src/components/link.tsx @@ -3,7 +3,7 @@ import { Link as GatsbyLink } from 'gatsby' import isAbsoluteUrl from 'is-absolute-url' interface LinkProps { - to: string | null + href: string | null activeClassName?: string partiallyActive?: string getProps?: any @@ -11,19 +11,41 @@ interface LinkProps { } const Link = ({ - to, + href, activeClassName, partiallyActive, getProps, ...props }: LinkProps & React.ReactNode) => - !to || isAbsoluteUrl(to) ? ( - + !href || isAbsoluteUrl(href) ? ( + {props.children} + {href && isAbsoluteUrl(href) && !href.includes('prisma.io') && ( + + + + )} ) : ( { {editDocsPath && ( - + Edit this page on GitHub )} diff --git a/src/components/parentTitleComp.tsx b/src/components/parentTitleComp.tsx index fce6baf768..8f7c1d2238 100644 --- a/src/components/parentTitleComp.tsx +++ b/src/components/parentTitleComp.tsx @@ -39,7 +39,7 @@ const ParentTitle = ({ slug, nonLink }: ParentTitleProps) => { {parentTitle.map((part: any, index: number) => ( {part.link && !nonLink ? ( - + {part.title} ) : ( diff --git a/src/components/search/hitComps.tsx b/src/components/search/hitComps.tsx index c235e185b8..8f8d688c98 100644 --- a/src/components/search/hitComps.tsx +++ b/src/components/search/hitComps.tsx @@ -56,7 +56,7 @@ const HitComp = styled.div` const DocHit = ({ hit, selected }: any) => hit._distinctSeqID == 0 ? ( - +

/{' '} diff --git a/src/components/shortcodes/index.tsx b/src/components/shortcodes/index.tsx index 2dd69171b2..ef4b577e48 100644 --- a/src/components/shortcodes/index.tsx +++ b/src/components/shortcodes/index.tsx @@ -16,6 +16,7 @@ import Admonition from './admonition' import Quiz from './quiz' import Tip from './tip' import NavigationLinksContainer from './navigationLinksContainer' +import Link from '../link' const shortcodes = { h1: () =>

, @@ -23,7 +24,7 @@ const shortcodes = { h3: ({ id, ...props }: any) =>

, h4: ({ id, ...props }: any) =>

, a: ({ href, ...props }: any) => ( - + ), p: (props: any) =>

, ul: (props: any) =>

    , diff --git a/src/components/shortcodes/subSections.tsx b/src/components/shortcodes/subSections.tsx index 2c8660578c..4adb5487b7 100644 --- a/src/components/shortcodes/subSections.tsx +++ b/src/components/shortcodes/subSections.tsx @@ -76,7 +76,7 @@ const Subsections = ({ depth, rootPath }: SubsecProps) => {
      {subs.map((sec: any, index: number) => (
    • - + {sec.title} {dep > 1 && sec.items.length > 0 && list(sec.items, dep - 1)} diff --git a/src/components/sidebar/treeNode.tsx b/src/components/sidebar/treeNode.tsx index fdba6ef8ac..d2b0c97d43 100644 --- a/src/components/sidebar/treeNode.tsx +++ b/src/components/sidebar/treeNode.tsx @@ -238,7 +238,7 @@ const TreeNode = ({ {title && label !== 'index' && !hidePage && ( {

      Prisma Documentation

      Choose one of our{' '} - getting started tutorials or explore the{' '} - ready-to-run examples on GitHub. Join our - thriving community on Slack and{' '} - GitHub for help and ideas. + getting started tutorials or explore + the ready-to-run examples on GitHub. Join + our thriving community on Slack and{' '} + GitHub for help and ideas. {SummaryLinkData.buttons.map((slink: any, index: number) => @@ -412,7 +412,7 @@ const Homepage = () => { {generalLink.links.map((link: any) => (
    • - + {link.text}
    • @@ -427,7 +427,7 @@ const Homepage = () => { {GuideLinkData.map((gLinkData: any, index: number) => ( { {icons[rLinkData.icon]} - + {rLinkData.categoryName}   {' '} @@ -459,7 +459,7 @@ const Homepage = () => { {rLinkData.links.map((link: any, index: number) => (
    • - + {link.text}
    • @@ -474,7 +474,7 @@ const Homepage = () => { {MoreUsefulLinks.map((uLink: any, index: number) => (
    • - + {uLink.text}