diff --git a/app/(event)/photo-gallery/single-gallery/page.tsx b/app/(event)/photo-gallery/single-gallery/page.tsx
index 82e0495..ad1de6d 100644
--- a/app/(event)/photo-gallery/single-gallery/page.tsx
+++ b/app/(event)/photo-gallery/single-gallery/page.tsx
@@ -26,8 +26,9 @@ export default function SingleGallery() {
const getEventGallery = useCallback(async () => {
try {
+ const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || 'https://api.tamilculturewaterloo.org/api';
const res = await axios.get(
- `https://api.tamilculturewaterloo.org/api/event-images/event/${eventId}`
+ `${API_BASE_URL}/event-images/event/${eventId}`
);
const formatted = res.data?.data?.map((img: any) => ({
id: img.id,
@@ -109,10 +110,14 @@ export default function SingleGallery() {
onClick={() => handleImageClick(index)}
>
{
+ e.target.onerror = null;
+ e.target.src = '/assets/img/all-images/memory/memory-img4.png';
+ }}
/>
diff --git a/components/events/PhotoGallerySection.jsx b/components/events/PhotoGallerySection.jsx
index fa5d439..be3a5d4 100644
--- a/components/events/PhotoGallerySection.jsx
+++ b/components/events/PhotoGallerySection.jsx
@@ -15,8 +15,9 @@ export default function PhotoGallerySection() {
const getEvents = async () => {
try {
+ const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || 'https://api.tamilculturewaterloo.org/api';
const eventRes = await axios.get(
- 'https://api.tamilculturewaterloo.org/api/events/'
+ `${API_BASE_URL}/events/`
);
const eventsData = eventRes?.data?.data || [];
@@ -94,9 +95,13 @@ export default function PhotoGallerySection() {