Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Feb 19, 2025
1 parent b847583 commit 1c3d2d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-expirator-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
paths:
- 'next-enterprise/expirator-service/**'
- "next-enterprise/expirator-service/**"

concurrency:
group: ${{ github.workflow }}
Expand Down
2 changes: 1 addition & 1 deletion next-15/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {sanityFetch} from '@/sanity/fetch'
import {defineQuery} from 'groq'
import type {Metadata} from 'next'
import {Suspense} from 'react'
import {TimeSince} from './TimeSince'
import {Reactions, ReactionsFallback} from './Reactions'
import {TimeSince} from './TimeSince'

const DEMO_QUERY = defineQuery(
`*[_type == "demo" && slug.current == $slug][0]{title,reactions[0..4]{_key,_ref},"fetchedAt": now()}`,
Expand Down
7 changes: 5 additions & 2 deletions next-enterprise/src/sanity/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ export async function sanityFetch<const QueryString extends string>({
cache: 'force-cache',
// Since we're double-fetching, and this request doesn't have a cache tags, we set a time based revalidation to ensure there's
// an eventual consistency guarantee for certain edge cases that wouldn't be caught be the expirator service
next: {revalidate}
next: {revalidate},
})
const data = await client.fetch(query, params, {
cacheMode: 'noStale',
cache: 'force-cache',
// If we're not in production we can't expect the webhook to be able to expire tags, so we fallback to time based revalidation
next: {revalidate: process.env.VERCEL_ENV === 'preview' ? revalidate : undefined, tags: syncTags},
next: {
revalidate: process.env.VERCEL_ENV === 'preview' ? revalidate : undefined,
tags: syncTags,
},
})
return {data, tags: syncTags}
}

0 comments on commit 1c3d2d9

Please sign in to comment.