fix import on invites
This commit is contained in:
parent
8581088bd4
commit
10e8cb35df
|
@ -38,7 +38,7 @@ function MyApp ({ Component, pageProps: { ...props } }) {
|
||||||
// this nodata var will get passed to the server on back/foward and
|
// this nodata var will get passed to the server on back/foward and
|
||||||
// 1. prevent data from reloading and 2. perserve scroll
|
// 1. prevent data from reloading and 2. perserve scroll
|
||||||
// (2) is not possible while intercepting nav with beforePopState
|
// (2) is not possible while intercepting nav with beforePopState
|
||||||
if (router.query.nodata) return
|
if (router.query.nodata || !router.isReady) return
|
||||||
|
|
||||||
router.replace({
|
router.replace({
|
||||||
pathname: router.pathname,
|
pathname: router.pathname,
|
||||||
|
|
|
@ -8,10 +8,10 @@ import { INVITE_FIELDS } from '../../fragments/invites'
|
||||||
import getSSRApolloClient from '../../api/ssrApollo'
|
import getSSRApolloClient from '../../api/ssrApollo'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { CenterLayout } from '../../components/layout'
|
import { CenterLayout } from '../../components/layout'
|
||||||
import { authOptions } from '../api/auth/[...nextauth]'
|
import { getAuthOptions } from '../api/auth/[...nextauth]'
|
||||||
|
|
||||||
export async function getServerSideProps ({ req, res, query: { id, error = null } }) {
|
export async function getServerSideProps ({ req, res, query: { id, error = null } }) {
|
||||||
const session = await getServerSession(req, res, authOptions(req))
|
const session = await getServerSession(req, res, getAuthOptions(req))
|
||||||
|
|
||||||
const client = await getSSRApolloClient({ req, res })
|
const client = await getSSRApolloClient({ req, res })
|
||||||
const { data } = await client.query({
|
const { data } = await client.query({
|
||||||
|
|
Loading…
Reference in New Issue