2022-05-26 22:23:43 -07:00
|
|
|
// All these imports are almost exclusively for the Admin.
|
|
|
|
// We should not be loading them for the main frontend UI.
|
|
|
|
|
2021-02-04 09:17:20 -08:00
|
|
|
// order matters!
|
2022-05-06 23:32:33 -07:00
|
|
|
import '../styles/variables.css';
|
2022-04-19 14:33:43 -07:00
|
|
|
import '../styles/global.less';
|
|
|
|
import '../styles/globals.scss';
|
2022-07-01 22:49:42 +02:00
|
|
|
import '../styles/ant-overrides.scss';
|
2020-10-22 01:03:15 -07:00
|
|
|
|
2022-10-27 23:39:26 -07:00
|
|
|
// TODO: Move this videojs sass to the player component.
|
2022-09-07 09:00:28 +02:00
|
|
|
import '../components/video/VideoJS/VideoJS.scss';
|
2022-05-26 21:44:54 -07:00
|
|
|
|
2020-10-22 16:18:18 -07:00
|
|
|
import { AppProps } from 'next/app';
|
2023-01-09 01:06:39 -08:00
|
|
|
import { ReactElement, ReactNode } from 'react';
|
|
|
|
import { NextPage } from 'next';
|
2022-05-25 20:38:40 -07:00
|
|
|
import { RecoilRoot } from 'recoil';
|
2020-10-22 16:18:18 -07:00
|
|
|
|
2023-01-09 01:06:39 -08:00
|
|
|
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
|
|
|
|
getLayout?: (page: ReactElement) => ReactNode;
|
|
|
|
};
|
2022-05-29 21:51:00 -07:00
|
|
|
|
2023-01-09 01:06:39 -08:00
|
|
|
type AppPropsWithLayout = AppProps & {
|
|
|
|
Component: NextPageWithLayout;
|
2022-09-07 09:00:28 +02:00
|
|
|
};
|
2020-09-30 15:12:10 -07:00
|
|
|
|
2023-01-09 01:06:39 -08:00
|
|
|
export default function App({ Component, pageProps }: AppPropsWithLayout) {
|
|
|
|
// Use the layout defined at the page level, if available
|
|
|
|
const getLayout = Component.getLayout ?? (page => page);
|
|
|
|
|
|
|
|
return getLayout(
|
|
|
|
<RecoilRoot>
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</RecoilRoot>,
|
|
|
|
);
|
|
|
|
}
|