import type { ReactElement, ReactNode } from "react"; import { SWRConfig } from "swr"; import type { NextPage } from "next"; import App, { AppContext } from "next/app"; import type { AppProps } from "next/app"; import Layout from "../components/common/Layout"; import "../styles/globals.scss"; import useGet from "../utils/hooks/useGet"; import { GenreItem } from "../types/http"; import { get } from "../utils/http"; import { Context } from "../libs/context"; 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 (