From 861f534195a0515da668f4bd1cca44fa4c175c45 Mon Sep 17 00:00:00 2001 From: Spencer Schoeneman Date: Tue, 14 Nov 2023 16:16:36 -0600 Subject: [PATCH] found typings for CleanLayout and HeaderFooterLayout - change backt to tsx files - revert change to tsconfig --- packages/nextjs/components/layouts/CleanLayout.jsx | 7 ------- packages/nextjs/components/layouts/CleanLayout.tsx | 13 +++++++++++++ ...eaderFooterLayout.jsx => HeaderFooterLayout.tsx} | 7 ++++++- packages/nextjs/tsconfig.json | 2 +- 4 files changed, 20 insertions(+), 9 deletions(-) delete mode 100644 packages/nextjs/components/layouts/CleanLayout.jsx create mode 100644 packages/nextjs/components/layouts/CleanLayout.tsx rename packages/nextjs/components/layouts/{HeaderFooterLayout.jsx => HeaderFooterLayout.tsx} (56%) diff --git a/packages/nextjs/components/layouts/CleanLayout.jsx b/packages/nextjs/components/layouts/CleanLayout.jsx deleted file mode 100644 index 7ab1284..0000000 --- a/packages/nextjs/components/layouts/CleanLayout.jsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function CleanLayout({ children }) { - return ( - <> -
{children}
- - ); -} diff --git a/packages/nextjs/components/layouts/CleanLayout.tsx b/packages/nextjs/components/layouts/CleanLayout.tsx new file mode 100644 index 0000000..2695706 --- /dev/null +++ b/packages/nextjs/components/layouts/CleanLayout.tsx @@ -0,0 +1,13 @@ +import React, { ReactNode } from "react"; + +interface CleanLayoutProps { + children: ReactNode; +} + +export default function CleanLayout({ children }: CleanLayoutProps) { + return ( + <> +
{children}
+ + ); +} diff --git a/packages/nextjs/components/layouts/HeaderFooterLayout.jsx b/packages/nextjs/components/layouts/HeaderFooterLayout.tsx similarity index 56% rename from packages/nextjs/components/layouts/HeaderFooterLayout.jsx rename to packages/nextjs/components/layouts/HeaderFooterLayout.tsx index 4d0b2b6..d1d0d5c 100644 --- a/packages/nextjs/components/layouts/HeaderFooterLayout.jsx +++ b/packages/nextjs/components/layouts/HeaderFooterLayout.tsx @@ -1,7 +1,12 @@ +import React, { ReactNode } from "react"; import { Footer } from "~~/components/Footer"; import { Header } from "~~/components/Header"; -export default function HeaderFooterLayout({ children }) { +interface HeaderFooterLayoutProps { + children: ReactNode; +} + +export default function HeaderFooterLayout({ children }: HeaderFooterLayoutProps) { return ( <>
diff --git a/packages/nextjs/tsconfig.json b/packages/nextjs/tsconfig.json index 18e580f..708cc8e 100644 --- a/packages/nextjs/tsconfig.json +++ b/packages/nextjs/tsconfig.json @@ -18,6 +18,6 @@ "~~/*": ["./*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.jsx"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"] }