fix import on invites

This commit is contained in:
keyan 2023-07-31 09:10:45 -05:00
parent 8581088bd4
commit 10e8cb35df
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ function MyApp ({ Component, pageProps: { ...props } }) {
// this nodata var will get passed to the server on back/foward and
// 1. prevent data from reloading and 2. perserve scroll
// (2) is not possible while intercepting nav with beforePopState
if (router.query.nodata) return
if (router.query.nodata || !router.isReady) return
router.replace({
pathname: router.pathname,

View File

@ -8,10 +8,10 @@ import { INVITE_FIELDS } from '../../fragments/invites'
import getSSRApolloClient from '../../api/ssrApollo'
import Link from 'next/link'
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 } }) {
const session = await getServerSession(req, res, authOptions(req))
const session = await getServerSession(req, res, getAuthOptions(req))
const client = await getSSRApolloClient({ req, res })
const { data } = await client.query({