static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } // console.log(pageProps); return { pageProps }; }
static async getInitialProps(ctx) { const isFromServer = !!ctx.req; const user = ctx.req ? ctx.req.user && ctx.req.user.toObject() : globalUser; if (isFromServer && user) { user._id = user._id.toString(); } const props = { user, isFromServer }; if (Page.getInitialProps) { Object.assign(props, (await Page.getInitialProps(ctx)) || {}); } return props; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }
static async getInitialProps({ Component, ctx }) { const pageProps = {}; if (Component.getInitialProps) { Object.assign(pageProps, await Component.getInitialProps(ctx)); } return { pageProps }; }