diff --git a/src/components/parks/ParkCard.tsx b/src/components/parks/ParkCard.tsx
index 106183c9..e4c0e051 100644
--- a/src/components/parks/ParkCard.tsx
+++ b/src/components/parks/ParkCard.tsx
@@ -48,7 +48,7 @@ export function ParkCard({ park }: ParkCardProps) {
{(park.card_image_url || park.card_image_id) ? (

diff --git a/src/components/rides/RideCard.tsx b/src/components/rides/RideCard.tsx
index a957e283..91bd3078 100644
--- a/src/components/rides/RideCard.tsx
+++ b/src/components/rides/RideCard.tsx
@@ -57,7 +57,7 @@ export function RideCard({ ride, showParkName = true, className, parkSlug }: Rid
{(ride.card_image_url || ride.card_image_id || ride.image_url) ? (

diff --git a/src/components/rides/RideModelCard.tsx b/src/components/rides/RideModelCard.tsx
index 2bca5c26..7f41853f 100644
--- a/src/components/rides/RideModelCard.tsx
+++ b/src/components/rides/RideModelCard.tsx
@@ -34,7 +34,7 @@ export function RideModelCard({ model, manufacturerSlug }: RideModelCardProps) {
>
{((model as any).card_image_url || (model as any).card_image_id) ? (

diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx
index b7f198b5..dc69951c 100644
--- a/src/components/ui/sonner.tsx
+++ b/src/components/ui/sonner.tsx
@@ -1,4 +1,4 @@
-import { useTheme } from "next-themes";
+import { useTheme } from "@/components/theme/ThemeProvider";
import { Toaster as Sonner, toast } from "sonner";
type ToasterProps = React.ComponentProps
;
diff --git a/src/components/upload/PhotoUpload.tsx b/src/components/upload/PhotoUpload.tsx
index d1329981..ae85ef61 100644
--- a/src/components/upload/PhotoUpload.tsx
+++ b/src/components/upload/PhotoUpload.tsx
@@ -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}`,
diff --git a/src/pages/DesignerDetail.tsx b/src/pages/DesignerDetail.tsx
index dba6a0ce..c3834299 100644
--- a/src/pages/DesignerDetail.tsx
+++ b/src/pages/DesignerDetail.tsx
@@ -137,7 +137,7 @@ export default function DesignerDetail() {
{(designer.banner_image_url || designer.banner_image_id) ? (

diff --git a/src/pages/ManufacturerDetail.tsx b/src/pages/ManufacturerDetail.tsx
index 67cc7f48..9de192d2 100644
--- a/src/pages/ManufacturerDetail.tsx
+++ b/src/pages/ManufacturerDetail.tsx
@@ -139,7 +139,7 @@ export default function ManufacturerDetail() {
{(manufacturer.banner_image_url || manufacturer.banner_image_id) ? (

diff --git a/src/pages/OperatorDetail.tsx b/src/pages/OperatorDetail.tsx
index 7c3b927c..962385df 100644
--- a/src/pages/OperatorDetail.tsx
+++ b/src/pages/OperatorDetail.tsx
@@ -166,7 +166,7 @@ export default function OperatorDetail() {
{(operator.banner_image_url || operator.banner_image_id) ? (

diff --git a/src/pages/ParkDetail.tsx b/src/pages/ParkDetail.tsx
index 3084ebd0..c9b66bc8 100644
--- a/src/pages/ParkDetail.tsx
+++ b/src/pages/ParkDetail.tsx
@@ -224,7 +224,7 @@ export default function ParkDetail() {
{(park.banner_image_url || park.banner_image_id) ? (

diff --git a/src/pages/PropertyOwnerDetail.tsx b/src/pages/PropertyOwnerDetail.tsx
index 6e1143cc..d9bfedf7 100644
--- a/src/pages/PropertyOwnerDetail.tsx
+++ b/src/pages/PropertyOwnerDetail.tsx
@@ -166,7 +166,7 @@ export default function PropertyOwnerDetail() {
{(owner.banner_image_url || owner.banner_image_id) ? (

diff --git a/src/pages/RideDetail.tsx b/src/pages/RideDetail.tsx
index 20ed1b1a..35c0ae43 100644
--- a/src/pages/RideDetail.tsx
+++ b/src/pages/RideDetail.tsx
@@ -221,7 +221,7 @@ export default function RideDetail() {
{(ride.banner_image_url || ride.banner_image_id) ? (