0

I'm new to next.js its an amazing development tool, but as I'm new here so facing some difficulties so my problem is I'm trying to google icons and its unable to use without cdn link here is my root file. here is my root file:

import './globals.css'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })


export const metadata = {
  title: 'Netflix',
  description: 'A movie app',
}

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body className={`${inter.className} bg-black `} >
        {children}</body>
    </html>
  )
}
in this code i dont know where to add my head and how to use head here i tried but error as always so please help me how to use cdn here.

1 Answers1

0

Next13 (App Router) you can add the link to CDN on root layout.tsx file, like this:

    <html lang="en">
      <head>
       <link href="https://fonts.googleapis.com/icon?family=Material+Icons" 
       rel="stylesheet" />
      </head>
      <body>
        {children}
      </body>
    </html>

And also answer to this question maybe help you.

Negin
  • 113
  • 2
  • 15