mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 14:51:13 -05:00
Update image sources to use environment variables for dynamic image hosting
Updates image URLs across various components and pages to dynamically fetch images using Cloudflare's image hosting service, configured via environment variables. Also updates the theme provider import for Sonner toasts and modifies the Supabase upload function to use a configurable Supabase URL. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f1469493-0a69-4efc-91bd-478d1879573a Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/f1469493-0a69-4efc-91bd-478d1879573a/HYhVkSk
This commit is contained in:
@@ -121,7 +121,8 @@ export function PhotoUpload({
|
||||
while (attempts < maxAttempts) {
|
||||
try {
|
||||
// Use direct fetch with URL parameters instead of supabase.functions.invoke with body
|
||||
const response = await fetch(`https://ydvtmnrszybqnbcqbdcy.supabase.co/functions/v1/upload-image?id=${encodeURIComponent(id)}`, {
|
||||
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL || 'https://ydvtmnrszybqnbcqbdcy.supabase.co';
|
||||
const response = await fetch(`${supabaseUrl}/functions/v1/upload-image?id=${encodeURIComponent(id)}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${(await supabase.auth.getSession()).data.session?.access_token}`,
|
||||
|
||||
Reference in New Issue
Block a user