Skip to content

Commit

Permalink
Add formatNumberWithSuffix function and update
Browse files Browse the repository at this point in the history
metadata description
  • Loading branch information
thebkht committed Nov 6, 2023
1 parent 98133cf commit 2f197e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/(Main)/[username]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { formatNumberWithSuffix } from '@/components/format-numbers';
import type { Metadata } from 'next'

type Props = {
Expand All @@ -22,11 +23,11 @@ export async function generateMetadata(
description: user?.bio === null || user?.bio === "" ? `${user?.username} has ${user?.postsnum} posts. Follow their to keep up with their activity on FalseNotes.` : user?.bio,
openGraph: {
title: `${user.username} ${user?.name ? `(` + user?.name + `)` : `` } | FalseNotes`,
description: user?.bio === null || user?.bio === "" ? `${user?.username} has ${user?.postsnum} posts. Follow their to keep up with their activity on FalseNotes.` : user?.bio,
description: user?.bio === null || user?.bio === "" ? `${user?.username} has ${formatNumberWithSuffix(user?.posts.length)} posts. Follow their to keep up with their activity on FalseNotes.` : user?.bio,
url: `${process.env.DOMAIN}/${user.username}`,
images: [
{
url: user?.profilepicture,
url: user?.image,
alt: `${user.username} | FalseNotes`,
}
],
Expand Down

0 comments on commit 2f197e7

Please sign in to comment.