|
@@ -5,6 +5,7 @@ import {
|
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
|
} from 'next';
|
|
} from 'next';
|
|
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
|
|
|
|
+import dynamic from 'next/dynamic';
|
|
|
|
|
|
|
|
import { BasicLayout } from '~/components/Layout/BasicLayout';
|
|
import { BasicLayout } from '~/components/Layout/BasicLayout';
|
|
|
import GrowiContextualSubNavigation from '~/components/Navbar/GrowiContextualSubNavigation';
|
|
import GrowiContextualSubNavigation from '~/components/Navbar/GrowiContextualSubNavigation';
|
|
@@ -20,6 +21,8 @@ import {
|
|
|
CommonProps, getServerSideCommonProps, useCustomTitle, getNextI18NextConfig,
|
|
CommonProps, getServerSideCommonProps, useCustomTitle, getNextI18NextConfig,
|
|
|
} from '../utils/commons';
|
|
} from '../utils/commons';
|
|
|
|
|
|
|
|
|
|
+const ShareLinkAlert = dynamic(() => import('~/components/Page/ShareLinkAlert'), { ssr: false });
|
|
|
|
|
+
|
|
|
|
|
|
|
|
type Props = CommonProps & {
|
|
type Props = CommonProps & {
|
|
|
shareLink: any, // TODO: Type 作る
|
|
shareLink: any, // TODO: Type 作る
|
|
@@ -51,7 +54,12 @@ const SharedPage: NextPage<Props> = (props: Props) => {
|
|
|
<header className="py-0 position-relative">
|
|
<header className="py-0 position-relative">
|
|
|
<GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} />
|
|
<GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} />
|
|
|
</header>
|
|
</header>
|
|
|
|
|
+
|
|
|
<div id="grw-fav-sticky-trigger" className="sticky-top"></div>
|
|
<div id="grw-fav-sticky-trigger" className="sticky-top"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="content-main" className="content-main grw-container-convertible my-5">
|
|
|
|
|
+ <ShareLinkAlert expiredAt={expiredAt} createdAt={createdAt} />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</BasicLayout>
|
|
</BasicLayout>
|
|
|
);
|
|
);
|
|
@@ -105,7 +113,7 @@ async function injectRoutingInformation(context: GetServerSidePropsContext, prop
|
|
|
// exipred
|
|
// exipred
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- props.shareLink = shareLink.toObject;
|
|
|
|
|
|
|
+ props.shareLink = shareLink.toObject();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export const getServerSideProps: GetServerSideProps = async(context: GetServerSidePropsContext) => {
|
|
export const getServerSideProps: GetServerSideProps = async(context: GetServerSidePropsContext) => {
|