next.js/test/e2e/app-dir/metadata-icons/app/custom-icon/page.tsx
page.tsx26 lines612 B
import { Metadata } from 'next'
import Link from 'next/link'
import { connection } from 'next/server'

export default function Page() {
  return (
    <>
      <Link id="custom-icon-sub-link" href="/custom-icon/sub">
        Go to another page with custom icon
      </Link>
    </>
  )
}

export async function generateMetadata(): Promise<Metadata> {
  await connection()
  await new Promise((resolve) => setTimeout(resolve, 300))

  return {
    icons: {
      // add version query to avoid caching on client side with multiple navs
      icon: `/heart.png?v=${Math.round(Math.random() * 1000)}`,
    },
  }
}
Quest for Codev2.0.0
/
SIGN IN