|
@@ -1,15 +1,13 @@
|
|
|
import {
|
|
import {
|
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
|
} from 'next';
|
|
} from 'next';
|
|
|
-import dynamic from 'next/dynamic';
|
|
|
|
|
|
|
|
|
|
import AdminPage from '~/components/Admin/AdminPage';
|
|
import AdminPage from '~/components/Admin/AdminPage';
|
|
|
import { SupportedActionType } from '~/interfaces/activity';
|
|
import { SupportedActionType } from '~/interfaces/activity';
|
|
|
import { CommonProps } from '~/pages/utils/commons';
|
|
import { CommonProps } from '~/pages/utils/commons';
|
|
|
|
|
|
|
|
-import { executeGetServerSideProps } from '../../utils/admin-page-util';
|
|
|
|
|
|
|
+import { retrieveServerSideProps } from '../../utils/admin-page-util';
|
|
|
|
|
|
|
|
-// const AdminPage = dynamic(() => import('~/components/Admin/AdminPage'), { ssr: false });
|
|
|
|
|
|
|
|
|
|
type Props = CommonProps & {
|
|
type Props = CommonProps & {
|
|
|
currentUser: any,
|
|
currentUser: any,
|
|
@@ -32,20 +30,13 @@ type Props = CommonProps & {
|
|
|
|
|
|
|
|
|
|
|
|
|
const AdminAppPage: NextPage<Props> = (props) => {
|
|
const AdminAppPage: NextPage<Props> = (props) => {
|
|
|
-
|
|
|
|
|
- console.log({ propsAdminAppPage: props });
|
|
|
|
|
-
|
|
|
|
|
return <AdminPage {...props}/>;
|
|
return <AdminPage {...props}/>;
|
|
|
- // return <>hoge</>;
|
|
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
export const getServerSideProps: GetServerSideProps = async(context: GetServerSidePropsContext) => {
|
|
export const getServerSideProps: GetServerSideProps = async(context: GetServerSidePropsContext) => {
|
|
|
- const props = await executeGetServerSideProps(context);
|
|
|
|
|
-
|
|
|
|
|
- console.log('aaa');
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const props = await retrieveServerSideProps(context);
|
|
|
return props;
|
|
return props;
|
|
|
};
|
|
};
|
|
|
|
|
|