File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "announcement" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "" , `/announcements/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "" , `/announcements/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findAnnouncement ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findAnnouncement ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "en" ) ;
2834 return < > < SiteHeader locale = "en" content = { content } /> < PostPage locale = "en" content = { content } post = { post } /> < SiteFooter locale = "en" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "blog" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "" , `/blog/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "" , `/blog/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findBlogPost ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findBlogPost ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "en" ) ;
2834 return < > < SiteHeader locale = "en" content = { content } /> < PostPage locale = "en" content = { content } post = { post } /> < SiteFooter locale = "en" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "announcement" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/es" , `/announcements/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/es" , `/announcements/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findAnnouncement ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findAnnouncement ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "es" ) ;
2834 return < > < SiteHeader locale = "es" content = { content } /> < PostPage locale = "es" content = { content } post = { post } /> < SiteFooter locale = "es" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "blog" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/es" , `/blog/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/es" , `/blog/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findBlogPost ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findBlogPost ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "es" ) ;
2834 return < > < SiteHeader locale = "es" content = { content } /> < PostPage locale = "es" content = { content } post = { post } /> < SiteFooter locale = "es" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "announcement" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/ja" , `/announcements/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/ja" , `/announcements/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findAnnouncement ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findAnnouncement ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "ja" ) ;
2834 return < > < SiteHeader locale = "ja" content = { content } /> < PostPage locale = "ja" content = { content } post = { post } /> < SiteFooter locale = "ja" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "blog" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/ja" , `/blog/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/ja" , `/blog/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findBlogPost ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findBlogPost ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "ja" ) ;
2834 return < > < SiteHeader locale = "ja" content = { content } /> < PostPage locale = "ja" content = { content } post = { post } /> < SiteFooter locale = "ja" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "announcement" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/pt-BR" , `/announcements/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/pt-BR" , `/announcements/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findAnnouncement ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findAnnouncement ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "pt-BR" ) ;
2834 return < > < SiteHeader locale = "pt-BR" content = { content } /> < PostPage locale = "pt-BR" content = { content } post = { post } /> < SiteFooter locale = "pt-BR" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "blog" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/pt-BR" , `/blog/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/pt-BR" , `/blog/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findBlogPost ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findBlogPost ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "pt-BR" ) ;
2834 return < > < SiteHeader locale = "pt-BR" content = { content } /> < PostPage locale = "pt-BR" content = { content } post = { post } /> < SiteFooter locale = "pt-BR" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "announcement" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/zh" , `/announcements/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/zh" , `/announcements/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findAnnouncement ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findAnnouncement ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "zh" ) ;
2834 return < > < SiteHeader locale = "zh" content = { content } /> < PostPage locale = "zh" content = { content } post = { post } /> < SiteFooter locale = "zh" content = { content } /> </ > ;
Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ export function generateStaticParams() {
1313 return getStaticPostParams ( "blog" ) ;
1414}
1515
16- export function generateMetadata ( { params } : Readonly < { params : { slug : string } } > ) : Metadata {
16+ export async function generateMetadata ( { params } : Readonly < { params : Promise < { slug : string } > } > ) : Promise < Metadata > {
17+ const { slug } = await params ;
18+ const canonical = routeHref ( "/zh" , `/blog/${ slug } ` ) ;
1719 return {
1820 alternates : {
19- canonical : routeHref ( "/zh" , `/blog/${ params . slug } ` ) ,
21+ canonical,
22+ } ,
23+ openGraph : {
24+ url : canonical ,
2025 } ,
2126 } ;
2227}
2328
24- export default function Page ( { params } : Readonly < { params : { slug : string } } > ) {
25- const post = findBlogPost ( params . slug ) ;
29+ export default async function Page ( { params } : Readonly < { params : Promise < { slug : string } > } > ) {
30+ const { slug } = await params ;
31+ const post = findBlogPost ( slug ) ;
2632 if ( ! post ) notFound ( ) ;
2733 const content = getSiteContent ( "zh" ) ;
2834 return < > < SiteHeader locale = "zh" content = { content } /> < PostPage locale = "zh" content = { content } post = { post } /> < SiteFooter locale = "zh" content = { content } /> </ > ;
You can’t perform that action at this time.
0 commit comments