Skip to content

Commit

Permalink
revalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
wslyvh committed Jun 18, 2024
1 parent 9a1ec45 commit 3979167
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/frontend/src/pages/api/frames/images/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import moment from 'moment'
import { frameConfig, getBids } from '../utils'

export const runtime = 'edge'
export const dynamic = 'force-dynamic' // defaults to auto
export const revalidate = 0

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const svg = encodeURIComponent(renderToStaticMarkup(<DotsIcon />))
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/api/frames/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const handleRequest = frames(async (req) => {
// Withdrawal period ended
if (moment().isAfter(frameConfig.withdrawDate)) {
return {
image: `/images`,
image: `/images?status=ended`,
imageOptions: {
headers: {
"Cache-Control": "public, max-age=0",
Expand All @@ -31,7 +31,7 @@ const handleRequest = frames(async (req) => {
// Bidding ended
if (moment().isAfter(frameConfig.endDate)) {
return {
image: `/images`,
image: `/images?status=withdrawal`,
imageOptions: {
headers: {
"Cache-Control": "public, max-age=0",
Expand All @@ -49,7 +49,7 @@ const handleRequest = frames(async (req) => {
}

return {
image: `/images`,
image: `/images?status=active`,
imageOptions: {
headers: {
"Cache-Control": "public, max-age=0",
Expand Down

0 comments on commit 3979167

Please sign in to comment.