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-05-26 22:23:43 -07:00
|
|
|
// import '../styles/ant-overrides.scss';
|
|
|
|
// import '../styles/markdown-editor.scss';
|
2021-02-04 09:17:20 -08:00
|
|
|
|
|
|
|
import '../styles/main-layout.scss';
|
2020-11-13 03:43:28 -08:00
|
|
|
|
2021-02-04 08:04:00 -08:00
|
|
|
import '../styles/form-textfields.scss';
|
|
|
|
import '../styles/form-misc-elements.scss';
|
|
|
|
import '../styles/config-socialhandles.scss';
|
|
|
|
import '../styles/config-storage.scss';
|
2021-07-25 22:12:50 -07:00
|
|
|
import '../styles/config-edit-string-tags.scss';
|
2021-02-04 08:04:00 -08:00
|
|
|
import '../styles/config-video-variants.scss';
|
2021-02-12 23:55:59 -08:00
|
|
|
import '../styles/config-public-details.scss';
|
2021-02-04 08:04:00 -08:00
|
|
|
|
2020-11-13 03:43:28 -08:00
|
|
|
import '../styles/home.scss';
|
2020-12-22 23:15:37 -08:00
|
|
|
import '../styles/chat.scss';
|
2021-02-14 01:30:42 -08:00
|
|
|
import '../styles/pages.scss';
|
2021-05-28 00:58:31 +02:00
|
|
|
import '../styles/offline-notice.scss';
|
2020-10-22 01:03:15 -07:00
|
|
|
|
2022-05-26 21:44:54 -07:00
|
|
|
import '../components/video/player.scss';
|
|
|
|
|
2020-10-22 16:18:18 -07:00
|
|
|
import { AppProps } from 'next/app';
|
2022-05-11 23:31:31 -07:00
|
|
|
import { Router, useRouter } from 'next/router';
|
2021-02-03 23:24:12 -08:00
|
|
|
|
2022-05-25 20:38:40 -07:00
|
|
|
import { RecoilRoot } from 'recoil';
|
2022-05-11 23:31:31 -07:00
|
|
|
import AdminLayout from '../components/layouts/admin-layout';
|
2022-04-28 12:57:51 -07:00
|
|
|
import SimpleLayout from '../components/layouts/SimpleLayout';
|
2020-10-22 16:18:18 -07:00
|
|
|
|
2020-09-30 15:12:10 -07:00
|
|
|
function App({ Component, pageProps }: AppProps) {
|
2022-05-11 23:31:31 -07:00
|
|
|
const router = useRouter() as Router;
|
2022-04-19 19:57:27 -07:00
|
|
|
if (router.pathname.startsWith('/admin')) {
|
|
|
|
return <AdminLayout pageProps={pageProps} Component={Component} router={router} />;
|
|
|
|
}
|
2022-05-25 20:38:40 -07:00
|
|
|
return (
|
|
|
|
<RecoilRoot>
|
|
|
|
<SimpleLayout pageProps={pageProps} Component={Component} router={router} />
|
|
|
|
</RecoilRoot>
|
|
|
|
);
|
2020-09-30 15:12:10 -07:00
|
|
|
}
|
|
|
|
|
2021-01-31 01:38:20 -08:00
|
|
|
export default App;
|