Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not use internal Next.js types #414

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions cli/template/base/src/pages/_app.tsx
@@ -1,8 +1,6 @@
import "../styles/globals.css";
import type { AppType } from "next/dist/shared/lib/utils";
import type { AppProps } from "next/app";

const MyApp: AppType = ({ Component, pageProps }) => {
export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
};

export default MyApp;
16 changes: 8 additions & 8 deletions cli/template/page-studs/_app/with-auth.tsx
@@ -1,16 +1,16 @@
import "../styles/globals.css";
import type { AppType } from "next/dist/shared/lib/utils";
import type { AppProps } from "next/app";
import type { Session } from "next-auth";
import { SessionProvider } from "next-auth/react";

const MyApp: AppType = ({
Component,
pageProps: { session, ...pageProps },
}) => {
export default function MyApp(appProps: AppProps<{ session: Session }>) {
const {
Component,
pageProps: { session, ...pageProps },
} = appProps;
return (
<SessionProvider session={session}>
<Component {...pageProps} />
</SessionProvider>
);
};

export default MyApp;
}
6 changes: 3 additions & 3 deletions cli/template/page-studs/_app/with-trpc.tsx
Expand Up @@ -2,14 +2,14 @@
import { httpBatchLink } from "@trpc/client/links/httpBatchLink";
import { loggerLink } from "@trpc/client/links/loggerLink";
import { withTRPC } from "@trpc/next";
import type { AppType } from "next/dist/shared/lib/utils";
import type { AppProps } from "next/app";
import superjson from "superjson";
import type { AppRouter } from "../server/router";
import "../styles/globals.css";

const MyApp: AppType = ({ Component, pageProps }) => {
function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
};
}

const getBaseUrl = () => {
if (typeof window !== "undefined") return ""; // browser should use relative url
Expand Down