PageShell
This component is an entry point for your app, it provides all the services offered by @leight
.
_app.tsx
import {emotionCache} from "@/my-app/emotion-cache";
import "@/my-app/styles/globals.css";
import {PageShell} from "@leight/mantine";
import {trpc} from "@my-app/trpc-client";
import {appWithTranslation} from "next-i18next";
import type {AppProps} from "next/app";
export function MyApp(
{
Component,
pageProps,
}: AppProps) {
/**
* Just use PageShell and fill all required props; if you want to add your own
* services, just put them as child as you're used to.
*/
return <PageShell
title={"my-app"}
emotionCache={emotionCache}
Component={Component}
pageProps={pageProps}
/>;
}
/**
* This is a bit unrelated, but to keep example complete, this provides connection of your app to tRPC.
*/
export default trpc.withTRPC(appWithTranslation(MyApp));