import { SWRConfig } from "swr"; import type { NextPage } from "next"; import type { AppProps } from "next/app"; import App, { AppContext } from "next/app"; import type { ReactElement, ReactNode } from "react"; import { Context } from "../libs/context"; import Layout from "../components/common/Layout"; import "../styles/globals.scss"; export type NextPageWithLayout
= NextPage
& {
getLayout?: (page: ReactElement) => ReactNode;
};
type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
pageProps: {
fallback?: {
[key: string]: any;
};
[key: string]: any;
};
};
const MyApp = ({ Component, pageProps }: AppPropsWithLayout) => {
const { fallback, genre, ...otherProps } = pageProps;
return (