diff --git a/.env.infoalloggi b/.env.infoalloggi
index 9a88b79..6c2c0ee 100644
--- a/.env.infoalloggi
+++ b/.env.infoalloggi
@@ -1,4 +1,4 @@
-BASE_URL="https://www.infoalloggi.it"
+#BASE_URL="https://www.infoalloggi.it"
NEXT_PUBLIC_BASE_URL = "https://info.marcopedone.it"
INTERNAL_BASE_URL = "http://web:3000"
#Api key for the mail service
diff --git a/.env.marcopedone b/.env.marcopedone
index 66301a0..914d9d2 100644
--- a/.env.marcopedone
+++ b/.env.marcopedone
@@ -1,4 +1,4 @@
-BASE_URL="https://info.marcopedone.it"
+#BASE_URL="https://info.marcopedone.it"
NEXT_PUBLIC_BASE_URL = "https://info.marcopedone.it"
INTERNAL_BASE_URL = "http://web:3000"
#Api key for the mail service
diff --git a/apps/infoalloggi/Dockerfile b/apps/infoalloggi/Dockerfile
index 2afbd31..9294b21 100644
--- a/apps/infoalloggi/Dockerfile
+++ b/apps/infoalloggi/Dockerfile
@@ -25,8 +25,8 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV SKIP_REDIS="true"
# Only essential build-time variables
-ARG BASE_URL
-ENV NEXT_PUBLIC_BASE_URL=$BASE_URL
+ARG NEXT_PUBLIC_BASE_URL
+ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
ARG NEXT_PUBLIC_STRIPE_PUBLIC_KEY
ENV NEXT_PUBLIC_STRIPE_PUBLIC_KEY=$NEXT_PUBLIC_STRIPE_PUBLIC_KEY
@@ -81,8 +81,8 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV SKIP_REDIS="false"
# Essential runtime variables
-ARG BASE_URL
-ENV NEXT_PUBLIC_BASE_URL=$BASE_URL
+ARG NEXT_PUBLIC_BASE_URL
+ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
ARG INTERNAL_BASE_URL
ENV INTERNAL_BASE_URL=$INTERNAL_BASE_URL
ARG POSTGRES_USER
diff --git a/apps/infoalloggi/emails/VerificaEmail.tsx b/apps/infoalloggi/emails/VerificaEmail.tsx
index 409c79f..419eba4 100644
--- a/apps/infoalloggi/emails/VerificaEmail.tsx
+++ b/apps/infoalloggi/emails/VerificaEmail.tsx
@@ -6,12 +6,18 @@ export type VerificaEmail_NewMail = {
};
type VerificaEmailProps = {
+ baseUrl: string;
token: string;
userId: string;
redirect?: string;
};
-const VerificaEmail = ({ token, userId, redirect }: VerificaEmailProps) => {
+const VerificaEmail = ({
+ baseUrl,
+ token,
+ userId,
+ redirect,
+}: VerificaEmailProps) => {
return (
<>
@@ -27,7 +33,7 @@ const VerificaEmail = ({ token, userId, redirect }: VerificaEmailProps) => {
diff --git a/apps/infoalloggi/emails/contatto_annuncio.tsx b/apps/infoalloggi/emails/contatto_annuncio.tsx
index 863432d..965b9e7 100644
--- a/apps/infoalloggi/emails/contatto_annuncio.tsx
+++ b/apps/infoalloggi/emails/contatto_annuncio.tsx
@@ -12,6 +12,7 @@ type ContattoAnnuncioEmailProps = {
email: string;
telefono: string;
messaggio: string;
+ baseUrl: string;
};
const ContattoAnnuncioEmail = ({
nome,
@@ -19,6 +20,7 @@ const ContattoAnnuncioEmail = ({
email,
telefono,
messaggio,
+ baseUrl,
}: ContattoAnnuncioEmailProps) => {
return (
@@ -40,7 +42,7 @@ const ContattoAnnuncioEmail = ({
diff --git a/apps/infoalloggi/emails/onboarding-servizio.tsx b/apps/infoalloggi/emails/onboarding-servizio.tsx
index f16b26f..1aa8ae8 100644
--- a/apps/infoalloggi/emails/onboarding-servizio.tsx
+++ b/apps/infoalloggi/emails/onboarding-servizio.tsx
@@ -22,12 +22,14 @@ type OnboardingServizioProps = {
codice: string;
prezzo: number;
}[];
+ baseUrl: string;
};
const OnboardingServizio = ({
token,
nome,
annunci,
+ baseUrl,
}: OnboardingServizioProps) => {
return (
@@ -47,7 +49,7 @@ const OnboardingServizio = ({
@@ -64,7 +66,7 @@ const OnboardingServizio = ({
alt={`Annuncio image - ${annuncio.codice}`}
className="block w-[240px] rounded-[4px] object-cover object-center"
height="140px"
- src={`${process.env.NEXT_PUBLIC_BASE_URL}/go-api/images/get/${annuncio.immagine}`}
+ src={`${baseUrl}/go-api/images/get/${annuncio.immagine}`}
width="100%"
/>
@@ -84,7 +86,7 @@ const OnboardingServizio = ({
Scheda dell'annuncio →
diff --git a/apps/infoalloggi/emails/pagamento-errore.tsx b/apps/infoalloggi/emails/pagamento-errore.tsx
index dc4ee17..da4771f 100644
--- a/apps/infoalloggi/emails/pagamento-errore.tsx
+++ b/apps/infoalloggi/emails/pagamento-errore.tsx
@@ -2,9 +2,13 @@ import { Button, Heading, Row, Section, Text } from "@react-email/components";
import Base from "./base";
export type PagamentoErrore_NewMail = {
mailType: "pagamentoErrore";
+ props: PagamentoErroreProps;
};
-const PagamentoErrore = () => {
+type PagamentoErroreProps = {
+ baseUrl: string;
+};
+const PagamentoErrore = ({ baseUrl }: PagamentoErroreProps) => {
return (
<>
@@ -22,7 +26,7 @@ const PagamentoErrore = () => {
diff --git a/apps/infoalloggi/emails/pagamento-ricezione.tsx b/apps/infoalloggi/emails/pagamento-ricezione.tsx
index 2b1fa8d..0976989 100644
--- a/apps/infoalloggi/emails/pagamento-ricezione.tsx
+++ b/apps/infoalloggi/emails/pagamento-ricezione.tsx
@@ -2,9 +2,13 @@ import { Button, Heading, Row, Section, Text } from "@react-email/components";
import Base from "./base";
export type PagamentoRicezione_NewMail = {
mailType: "pagamentoRicezione";
+ props: PagamentoRicezioneProps;
};
-const PagamentoRicezione = () => {
+type PagamentoRicezioneProps = {
+ baseUrl: string;
+};
+const PagamentoRicezione = ({ baseUrl }: PagamentoRicezioneProps) => {
return (
<>
@@ -22,7 +26,7 @@ const PagamentoRicezione = () => {
diff --git a/apps/infoalloggi/emails/registrazione-avvenuta.tsx b/apps/infoalloggi/emails/registrazione-avvenuta.tsx
index 760d168..27f561a 100644
--- a/apps/infoalloggi/emails/registrazione-avvenuta.tsx
+++ b/apps/infoalloggi/emails/registrazione-avvenuta.tsx
@@ -2,9 +2,13 @@ import { Button, Heading, Row, Section, Text } from "@react-email/components";
import Base from "./base";
export type RegistrazioneAvvenuta_NewMail = {
mailType: "registrazioneAvvenuta";
+ props: RegistrazioneAvvenutaProps;
+};
+type RegistrazioneAvvenutaProps = {
+ baseUrl: string;
};
-const RegistrazioneAvvenuta = () => {
+const RegistrazioneAvvenuta = ({ baseUrl }: RegistrazioneAvvenutaProps) => {
return (
<>
@@ -21,7 +25,7 @@ const RegistrazioneAvvenuta = () => {
diff --git a/apps/infoalloggi/src/components/tables/servizio-table.tsx b/apps/infoalloggi/src/components/tables/servizio-table.tsx
index ba87040..d28ee92 100644
--- a/apps/infoalloggi/src/components/tables/servizio-table.tsx
+++ b/apps/infoalloggi/src/components/tables/servizio-table.tsx
@@ -168,7 +168,7 @@ export const TabServizio = ({