Skip to content
Snippets Groups Projects
Commit 70b10e8e authored by Alexander Schoch's avatar Alexander Schoch
Browse files

Fix error that copying an event link would copy undefined

parent e849554a
No related branches found
No related tags found
No related merge requests found
......@@ -49,9 +49,7 @@ export default function About() {
<Grid.Col md={4} sm={6} xs={12}>
<Paper shadow="md">
<Alert title={t("aboutUs")} variant="outline">
<Text>
{about.description[locale || "en"]}
</Text>
<Text>{about.description[locale || "en"]}</Text>
</Alert>
</Paper>
......
......@@ -111,8 +111,9 @@ export default function EventCard({
};
const copyLink = (event) => {
const baseUrl = process.env.NEXT_PUBLIC_DEPLOYMENT === 'dev' ? 'www.thealt.staging-sip.ethz.ch' : 'thealternative.ch';
navigator.clipboard.writeText(
process.env.NEXT_PUBLIC_API_URL + "/?eventId=" + String(event)
baseUrl + "/?eventId=" + String(event)
);
showNotification({
title: t("copied"),
......
......@@ -2,6 +2,7 @@
echo "DATABASE_URL=mysql://$SIP_MYSQL_ALT_USER:$SIP_MYSQL_ALT_PW@$SIP_MYSQL_ALT_SERVER:$SIP_MYSQL_ALT_PORT/$SIP_MYSQL_ALT_NAME?schema=public" > .env
echo "NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL" >> .env
echo "NEXT_PUBLIC_DEPLOYMENT=$NEXT_PUBLIC_DEPLOYMENT" >> .env
npx prisma migrate deploy
npx prisma generate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment