Skip to content

Commit

Permalink
Update +page.svelte
Browse files Browse the repository at this point in the history
Access the PUBLIC_URL var directly. This whole message composition needs to be moved to server side, however.
  • Loading branch information
lilith committed Aug 1, 2023
1 parent a624099 commit a17c25d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/profile/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { env as public_env } from '$env/dynamic/public';
import { PRONOUNS, LANGUAGES } from '../../constants';
import Modal from '../Modal.svelte';
import { browser } from '$app/environment';
Expand Down Expand Up @@ -133,7 +134,7 @@
on:click={async () => {
acceptedTermsAt = new Date();

const url = import.meta.env.PROD ? $page.data.PUBLIC_URL : location.host;
const url = import.meta.env.PROD ? public_env.PUBLIC_URL : location.host;
await writeReq('/twilio', {
msg: `Thanks for subscribing to reminders and friend availability notifications from ${url}! You can disable this at any time on your Profile page or by responding STOP.`,
phone: $page.data.user.phone
Expand Down

0 comments on commit a17c25d

Please sign in to comment.