26 lines
605 B
TypeScript
26 lines
605 B
TypeScript
import "@/styles/globals.css";
|
|
import { PagePropsType } from "@/types";
|
|
import type { AppProps } from "next/app";
|
|
import "prism-themes/themes/prism-dracula.css";
|
|
import React from "react";
|
|
|
|
export type AppContextType = {
|
|
pageProps: PagePropsType;
|
|
};
|
|
|
|
export const AppContext = React.createContext<AppContextType>({
|
|
pageProps: {},
|
|
});
|
|
|
|
export default function App({ Component, pageProps }: AppProps) {
|
|
return (
|
|
<AppContext.Provider
|
|
value={{
|
|
pageProps,
|
|
}}
|
|
>
|
|
<Component {...pageProps} />
|
|
</AppContext.Provider>
|
|
);
|
|
}
|