feat: remove inaccurate authors
This commit is contained in:
parent
de20c2b3b3
commit
c78693d518
|
|
@ -50,9 +50,9 @@ export const getServerSideProps = async (
|
|||
reject(notFound())
|
||||
}
|
||||
|
||||
if (page?.authors[0]) {
|
||||
await prefetchGetUserSites(page?.authors[0], queryClient)
|
||||
}
|
||||
// if (page?.authors[0]) {
|
||||
// await prefetchGetUserSites(page?.authors[0], queryClient)
|
||||
// }
|
||||
} catch (error) {
|
||||
reject(error)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const SitePage: React.FC<{
|
|||
page?: Note | null
|
||||
site?: Profile | null
|
||||
}> = ({ page, site }) => {
|
||||
const author = useGetUserSites(page?.authors?.[0])
|
||||
// const author = useGetUserSites(page?.authors?.[0])
|
||||
|
||||
function addPageJsonLd() {
|
||||
return {
|
||||
|
|
@ -23,17 +23,15 @@ export const SitePage: React.FC<{
|
|||
}),
|
||||
datePublished: page?.date_published,
|
||||
dateModified: page?.date_updated,
|
||||
...(author && {
|
||||
author: [
|
||||
{
|
||||
"@type": "Person",
|
||||
name: author?.data?.[0]?.name,
|
||||
url: getSiteLink({
|
||||
subdomain: author?.data?.[0]?.username || "",
|
||||
}),
|
||||
},
|
||||
],
|
||||
}),
|
||||
author: [
|
||||
{
|
||||
"@type": "Person",
|
||||
name: site?.name,
|
||||
url: getSiteLink({
|
||||
subdomain: site?.username || "",
|
||||
}),
|
||||
},
|
||||
],
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
@ -61,9 +59,7 @@ export const SitePage: React.FC<{
|
|||
{page?.title}
|
||||
</h2>
|
||||
)}
|
||||
{page?.tags?.includes("post") && (
|
||||
<PostMeta page={page} site={site} author={author.data?.[0]} />
|
||||
)}
|
||||
{page?.tags?.includes("post") && <PostMeta page={page} site={site} />}
|
||||
</div>
|
||||
<PageContent
|
||||
className="mt-10"
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||
image: `${link}${page.cover}`,
|
||||
date_published: page.date_published,
|
||||
date_modified: page.date_updated,
|
||||
authors: page.authors?.map((author: any) => ({
|
||||
name: author,
|
||||
})),
|
||||
// authors: page.authors?.map((author: any) => ({
|
||||
// name: author,
|
||||
// })),
|
||||
tags: page.tags,
|
||||
})),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue