import React from 'react'
import { useRouter } from 'next/router'
export interface LinkType {
slug: string
title: string
shortSummary: string
}
interface BackLinksProps {
linkList: LinkType[]
}
function BackLinks({ linkList }: BackLinksProps) {
return (
Link to this note
{(linkList != null && linkList.length > 0)
? <>
{linkList.map(aLink =>
)}
>
: <>
No backlinks found
>}
)
}
interface MDContentProps {
content: string
backLinks: LinkType[]
}
function MDContent({ content, backLinks }: MDContentProps) {
useRouter()
return (
)
}
interface BackLinksGroupProps {
links: LinkType[]
}
function BackLinksGroup({ links }: BackLinksGroupProps) {
if (links?.length === 0) {
return (
No backlinks found
)
}
return (
BackLinks
)
}
export default MDContent