Skip to content

Commit

Permalink
serve offline image thorugh cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikskog committed May 6, 2024
1 parent 66d01e4 commit 2ab9b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dashboard/src/modules/offline/use-offline-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/re
import Link from "next/link"
import { useMemo } from "react"
import { formatDate } from "../../utils/format"
import { buildAssetUrl } from "../../utils/s3"
import { buildAssetUrl, buildImgUrl } from "../../utils/s3"

interface Props {
data: Offline[]
Expand Down Expand Up @@ -46,7 +46,7 @@ export const useOfflineTable = ({ data }: Props) => {
return "Ingen bilde"
}
return (
<Anchor target="_blank" href={buildAssetUrl(image.assetKey)} rel="noopenere">
<Anchor target="_blank" href={buildImgUrl(image)} rel="noopenere">
Link
</Anchor>
)
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/utils/s3.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Image } from "@dotkomonline/types"
import type { File } from "../../stubs/file/File"

// Expected response: 204 No Content. Returns resource URL if successful.
Expand Down

0 comments on commit 2ab9b87

Please sign in to comment.