diff --git a/src/components/site/SiteLayout.server.tsx b/src/components/site/SiteLayout.server.tsx index bc664a57..9441a211 100644 --- a/src/components/site/SiteLayout.server.tsx +++ b/src/components/site/SiteLayout.server.tsx @@ -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) } diff --git a/src/components/site/SitePage.tsx b/src/components/site/SitePage.tsx index 7aae4b8e..5417e586 100644 --- a/src/components/site/SitePage.tsx +++ b/src/components/site/SitePage.tsx @@ -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} )} - {page?.tags?.includes("post") && ( - - )} + {page?.tags?.includes("post") && } { 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, })), }),