Skip to content

Commit

Permalink
fix: remove duplicate main tags (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Jul 5, 2024
1 parent 42a485a commit 1cfbb11
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .changeset/eighty-toys-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

remove duplicate `<main>` tags
7 changes: 3 additions & 4 deletions cli/template/extras/src/app/layout/base.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import "~/styles/globals.css";

import { GeistSans } from "geist/font/sans";
import { type Metadata } from "next";

export const metadata = {
export const metadata: Metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
icons: [{ rel: "icon", url: "/favicon.ico" }],
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en">
<body className={GeistSans.className}>{children}</body>
Expand Down
7 changes: 3 additions & 4 deletions cli/template/extras/src/app/layout/with-trpc-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import "~/styles/globals.css";

import { GeistSans } from "geist/font/sans";
import { type Metadata } from "next";

import { TRPCReactProvider } from "~/trpc/react";

export const metadata = {
export const metadata: Metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
icons: [{ rel: "icon", url: "/favicon.ico" }],
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en" className={`${GeistSans.variable}`}>
<body>
Expand Down
7 changes: 3 additions & 4 deletions cli/template/extras/src/app/layout/with-trpc.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import "~/styles/globals.css";

import { GeistSans } from "geist/font/sans";
import { type Metadata } from "next";

import { TRPCReactProvider } from "~/trpc/react";

export const metadata = {
export const metadata: Metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
icons: [{ rel: "icon", url: "/favicon.ico" }],
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en">
<body className={GeistSans.className}>
Expand Down
7 changes: 3 additions & 4 deletions cli/template/extras/src/app/layout/with-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import "~/styles/globals.css";

import { GeistSans } from "geist/font/sans";
import { type Metadata } from "next";

export const metadata = {
export const metadata: Metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
icons: [{ rel: "icon", url: "/favicon.ico" }],
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en" className={`${GeistSans.variable}`}>
<body>{children}</body>
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import "~/styles/globals.css";

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
);
};

Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const MyApp: AppType<{ session: Session | null }> = ({
}) => {
return (
<SessionProvider session={session}>
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
</SessionProvider>
);
};
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-auth-trpc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const MyApp: AppType<{ session: Session | null }> = ({
}) => {
return (
<SessionProvider session={session}>
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
</SessionProvider>
);
};
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-auth-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const MyApp: AppType<{ session: Session | null }> = ({
}) => {
return (
<SessionProvider session={session}>
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
</SessionProvider>
);
};
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const MyApp: AppType<{ session: Session | null }> = ({
}) => {
return (
<SessionProvider session={session}>
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
</SessionProvider>
);
};
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-trpc-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import "~/styles/globals.css";

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
);
};

Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-trpc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import "~/styles/globals.css";

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
);
};

Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/src/pages/_app/with-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import "~/styles/globals.css";

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={GeistSans.className}>
<div className={GeistSans.className}>
<Component {...pageProps} />
</main>
</div>
);
};

Expand Down

0 comments on commit 1cfbb11

Please sign in to comment.