Skip to content

Commit 2390615

Browse files
authored
Fix playground warning about incorrectly loading stylesheets in Next.js (#1454)
1 parent 9a39fc3 commit 2390615

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

packages/playground-react/pages/_app.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -138,27 +138,6 @@ function KeyCaster() {
138138
function MyApp({ Component, pageProps }) {
139139
return (
140140
<>
141-
<Head>
142-
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
143-
<meta name="viewport" content="width=device-width, initial-scale=1" />
144-
145-
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
146-
<script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script>
147-
148-
<link
149-
rel="icon"
150-
type="image/png"
151-
sizes="32x32"
152-
href="https://headlessui.dev/favicon-32x32.png"
153-
/>
154-
<link
155-
rel="icon"
156-
type="image/png"
157-
sizes="16x16"
158-
href="https://headlessui.dev/favicon-16x16.png"
159-
/>
160-
</Head>
161-
162141
<div className="flex h-screen flex-col overflow-hidden bg-gray-700 font-sans text-gray-900 antialiased">
163142
<header className="relative z-10 flex flex-shrink-0 items-center justify-between border-b border-gray-200 bg-gray-700 px-4 py-4 sm:px-6 lg:px-8">
164143
<NextLink href="/">
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Html, Head, Main, NextScript } from 'next/document'
2+
3+
export default function Document() {
4+
return (
5+
<Html>
6+
<Head>
7+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
10+
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
11+
<script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script>
12+
13+
<link
14+
rel="icon"
15+
type="image/png"
16+
sizes="32x32"
17+
href="https://headlessui.dev/favicon-32x32.png"
18+
/>
19+
<link
20+
rel="icon"
21+
type="image/png"
22+
sizes="16x16"
23+
href="https://headlessui.dev/favicon-16x16.png"
24+
/>
25+
</Head>
26+
<body>
27+
<Main />
28+
<NextScript />
29+
</body>
30+
</Html>
31+
)
32+
}

0 commit comments

Comments
 (0)