From 832099b1d311136bdc407afe31b58a9e3bed8406 Mon Sep 17 00:00:00 2001 From: Przemek Date: Mon, 21 Oct 2024 12:56:46 +0200 Subject: [PATCH 1/3] fixed img path --- .env.example | 3 ++- config/php/index.php | 3 +++ index.html | 1 + src/components/Routes/index.tsx | 26 +++++++++++++------------- src/config/index.ts | 5 +++++ src/index.tsx | 9 +++++++-- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.env.example b/.env.example index 437d32fa..968ce637 100644 --- a/.env.example +++ b/.env.example @@ -12,4 +12,5 @@ VITE_APP_FIREBASE_STORAGEBUCKET= VITE_APP_FIREBASE_MESSAGINGSENDERID= VITE_APP_FIREBASE_APPID= VITE_APP_IOS_APIKEY= -VITE_APP_ANDROID_APIKEY= \ No newline at end of file +VITE_APP_ANDROID_APIKEY= +VITE_APP_PUBLIC_IMG_URL= \ No newline at end of file diff --git a/config/php/index.php b/config/php/index.php index 623de2c3..079c882a 100644 --- a/config/php/index.php +++ b/config/php/index.php @@ -46,6 +46,9 @@ if (isset($setup['VITE_APP_URL'])) { $content = preg_replace('/(?<=window.VITE_APP_URL=")(.*)(?=")/', $setup['VITE_APP_URL'], $content); } + if (isset($setup['VITE_APP_PUBLIC_IMG_URL'])) { + $content = preg_replace('/(?<=window.VITE_APP_PUBLIC_IMG_URL=")(.*)(?=")/', $setup['VITE_APP_PUBLIC_IMG_URL'], $content); + } } } diff --git a/index.html b/index.html index a586829e..6d38dbd0 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,7 @@ window.VITE_APP_FIREBASE_APPID = null; window.VITE_APP_IOS_APIKEY = null; window.VITE_APP_ANDROID_APIKEY = null; + window.VITE_APP_PUBLIC_IMG_URL = null; diff --git a/src/components/Routes/index.tsx b/src/components/Routes/index.tsx index 0b375768..1cdb67be 100644 --- a/src/components/Routes/index.tsx +++ b/src/components/Routes/index.tsx @@ -30,8 +30,8 @@ const NotFoundPage = lazy(() => import("../../pages/404/index")); const CoursesPage = lazy(() => import("../../pages/courses")); const CoursePage = lazy(() => import("../../pages/courses/course/index")); const CoursePreviewPage = lazy(() => import("../../pages/courses/preview")); -// const ConsultationPage = lazy(() => import("../../pages/consultation/index")); -// const ConsultationsPage = lazy(() => import("../../pages/consultations")); +const ConsultationPage = lazy(() => import("../../pages/consultation/index")); +const ConsultationsPage = lazy(() => import("../../pages/consultations")); const ResetPage = lazy(() => import("../../pages/reset-password/index")); // const EventsPage = lazy(() => import("../../pages/events")); // const EventPage = lazy(() => import("../../pages/event")); @@ -56,9 +56,9 @@ const MyOrdersPage = lazy(() => import("../../pages/user/my-orders")); const MyNotificationsPage = lazy( () => import("../../pages/user/my-notifications") ); -// const MyConsultationsPage = lazy( -// () => import("../../pages/user/my-consultations") -// ); +const MyConsultationsPage = lazy( + () => import("../../pages/user/my-consultations") +); const MyDataPage = lazy(() => import("../../pages/user/my-data")); const CourseProgramPage = lazy(() => import("../../pages/course/index")); const CartPage = lazy(() => import("../../pages/cart/index")); @@ -93,7 +93,7 @@ const Routes: React.FC = (): ReactElement => { // authentication, page, myProfile, - // myConsultations, + myConsultations, myOrders, // tutors, // tutor, @@ -101,8 +101,8 @@ const Routes: React.FC = (): ReactElement => { course, preview, courseProgram, - // consultation, - // consultations, + consultation, + consultations, cart, reset, notFound, @@ -143,12 +143,12 @@ const Routes: React.FC = (): ReactElement => { {/* */} {/* platform visibility pages*/} {/* */} - {/* */} - {/* */} + /> + {/* */} @@ -180,11 +180,11 @@ const Routes: React.FC = (): ReactElement => { path={myStationaryEvents} component={MyStationaryEvents} /> */} - {/* */} + /> {API_URL ? ( - + From 8c57696deeb488947a422ea25b6502bf1cb49f03 Mon Sep 17 00:00:00 2001 From: Przemek Date: Mon, 21 Oct 2024 12:59:48 +0200 Subject: [PATCH 2/3] fixed img path --- src/components/Routes/index.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/Routes/index.tsx b/src/components/Routes/index.tsx index 1cdb67be..0b375768 100644 --- a/src/components/Routes/index.tsx +++ b/src/components/Routes/index.tsx @@ -30,8 +30,8 @@ const NotFoundPage = lazy(() => import("../../pages/404/index")); const CoursesPage = lazy(() => import("../../pages/courses")); const CoursePage = lazy(() => import("../../pages/courses/course/index")); const CoursePreviewPage = lazy(() => import("../../pages/courses/preview")); -const ConsultationPage = lazy(() => import("../../pages/consultation/index")); -const ConsultationsPage = lazy(() => import("../../pages/consultations")); +// const ConsultationPage = lazy(() => import("../../pages/consultation/index")); +// const ConsultationsPage = lazy(() => import("../../pages/consultations")); const ResetPage = lazy(() => import("../../pages/reset-password/index")); // const EventsPage = lazy(() => import("../../pages/events")); // const EventPage = lazy(() => import("../../pages/event")); @@ -56,9 +56,9 @@ const MyOrdersPage = lazy(() => import("../../pages/user/my-orders")); const MyNotificationsPage = lazy( () => import("../../pages/user/my-notifications") ); -const MyConsultationsPage = lazy( - () => import("../../pages/user/my-consultations") -); +// const MyConsultationsPage = lazy( +// () => import("../../pages/user/my-consultations") +// ); const MyDataPage = lazy(() => import("../../pages/user/my-data")); const CourseProgramPage = lazy(() => import("../../pages/course/index")); const CartPage = lazy(() => import("../../pages/cart/index")); @@ -93,7 +93,7 @@ const Routes: React.FC = (): ReactElement => { // authentication, page, myProfile, - myConsultations, + // myConsultations, myOrders, // tutors, // tutor, @@ -101,8 +101,8 @@ const Routes: React.FC = (): ReactElement => { course, preview, courseProgram, - consultation, - consultations, + // consultation, + // consultations, cart, reset, notFound, @@ -143,12 +143,12 @@ const Routes: React.FC = (): ReactElement => { {/* */} {/* platform visibility pages*/} {/* */} - - + /> */} + {/* */} {/* */} @@ -180,11 +180,11 @@ const Routes: React.FC = (): ReactElement => { path={myStationaryEvents} component={MyStationaryEvents} /> */} - + /> */} Date: Mon, 21 Oct 2024 13:03:53 +0200 Subject: [PATCH 3/3] fixed img path --- .github/workflows/pages.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 6398b99d..cf80748c 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -17,11 +17,12 @@ jobs: env: CI: false VITE_APP_YBUG_ID: 01m1nn5zqystt1qq5n11 - VITE_APP_PUBLIC_API_URL: https://api-stage.escolalms.com + VITE_APP_PUBLIC_API_URL: https://demo-stage.api.s.wellms.io VITE_APP_SENTRYDSN: https://1abed5b3f95e41be8e1c39c33af12506@sentry.etd24.pl/96 VITE_APP_ROUTING_TYPE: HashRouter # VITE_APP_PUBLIC_MOBILE_DEVICE: false - VITE_APP_PUBLIC_URL: https://demo-stage.escolalms.com + VITE_APP_PUBLIC_URL: https://demo-stage.app.s.wellms.io + VITE_APP_PUBLIC_IMG_URL: https://wellms-multidomain-demo-stage.s3.pl-waw.scw.cloud run: | npm i --legacy-peer-deps npm run build