Skip to content

Commit

Permalink
Potential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leog committed Oct 13, 2023
1 parent 3e7a25d commit 69a73d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sanity.client.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { createClient } from "@sanity/client"
import { apiVersion, dataset, projectId, useCdn } from 'lib/sanity.api'
import {
allCategoriesQuery,
Expand All @@ -14,7 +15,6 @@ import {
type Settings,
settingsQuery,
} from 'lib/sanity.queries'
import { createClient } from 'next-sanity'

/**
* Checks if it's safe to create a client instance, as `@sanity/client` will throw an error if `projectId` is false
Expand Down
2 changes: 1 addition & 1 deletion pages/api/og.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createClient } from "@sanity/client"
import { ImageResponse } from '@vercel/og'
import { apiVersion, dataset, projectId } from 'lib/sanity.api'
import type { NextRequest, NextResponse } from 'next/server'
import type { PageConfig } from 'next/types'
import { createClient } from 'next-sanity'

export const config: PageConfig = { runtime: 'experimental-edge' }

Expand Down
2 changes: 1 addition & 1 deletion pages/api/preview.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { createClient } from "@sanity/client"
import {
apiVersion,
dataset,
Expand All @@ -8,7 +9,6 @@ import {
import { postBySlugQuery } from 'lib/sanity.queries'
import type { NextApiRequest, NextApiResponse } from 'next'
import type { PageConfig } from 'next/types'
import { createClient } from 'next-sanity'
import { getSecret } from 'plugins/productionUrl/utils'

// res.setPreviewData only exists in the nodejs runtime, setting the config here allows changing the global runtime
Expand Down

1 comment on commit 69a73d1

@vercel
Copy link

@vercel vercel bot commented on 69a73d1 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

208club-uy – ./

208-uy.vercel.app
208club-uy-leog.vercel.app
208club-uy-git-main-leog.vercel.app
208.uy
208club.uy
www.208.uy

Please sign in to comment.