Skip to content

Commit

Permalink
Change image url based on env
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Aug 16, 2024
1 parent 1a736e7 commit 070f5cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server/frames/sources/1723117763252/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @next/next/no-img-element */
/* eslint-disable react/jsx-key */
/** @jsxImportSource frog/jsx */
import { env } from '@/env.mjs'
import { createFramesLike } from '@/server/datahub-queue/frames'
import { FRAME_IMAGE_SIZE, FrogFramesManager } from '@/server/frames/utils/frog'
import {
Expand All @@ -25,9 +26,7 @@ const frameRootPath = `/${frameName}`
const getButtonHref = (path: string) => urlJoin(frameRootPath, path)

function getImageUrl(imageId: number): string {
return process.env.NODE_ENV === 'development'
? `http://localhost:3000/frames/${frameName}/${imageId}.jpg`
: `https://epicapp.net/frames/${frameName}/${imageId}.jpg`
return `${env.NEXTAUTH_URL}/frames/${frameName}/${imageId}.jpg`
}

const sessions: Map<number, { parentProxyAddress: string; signer: Signer }> =
Expand Down

0 comments on commit 070f5cb

Please sign in to comment.