fix: resolve Supabase storage pdf URLs on client and server
Some checks failed
Staging Build / build (push) Has been cancelled

This commit is contained in:
DanielS
2026-07-03 00:49:11 +02:00
parent 78a16607f9
commit 4b3ba63e2c
4 changed files with 24 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import { Button } from '@/components/ui/button'
import { Card, CardContent } from '@/components/ui/card'
import { Badge } from '@/components/ui/badge'
import type { Order } from '@/lib/types'
import { resolveSupabaseUrl } from '@/lib/utils'
const statusLabel: Record<string, string> = {
pending: 'Eingegangen',
@@ -142,12 +143,12 @@ export default async function MyOrdersPage() {
{o.pdf_url && (
<>
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
<a href={o.pdf_url} target="_blank" rel="noopener noreferrer">
<a href={resolveSupabaseUrl(o.pdf_url)} target="_blank" rel="noopener noreferrer">
<ExternalLink className="w-3 h-3 mr-1" /> Anfrage ansehen
</a>
</Button>
<Button variant="ghost" size="sm" asChild className="text-xs text-slate-400 hover:text-white">
<a href={o.pdf_url} download>
<a href={resolveSupabaseUrl(o.pdf_url)} download>
<Download className="w-3 h-3 mr-1" /> PDF
</a>
</Button>