Skip to content

Commit

Permalink
Fixed DonateMoney to use correct campaign name and only show couponCo…
Browse files Browse the repository at this point in the history
…de if one is added.
  • Loading branch information
DietBepis1 committed Oct 7, 2024
1 parent ffa8044 commit 9bd9129
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TWILIO_AUTH_TOKEN=TWILIO_SECRET_KEY

# To run in single-campaign mode, set the following environment vars
VUE_APP_CAMPAIGN_MODE=single
VUE_APP_FEATURED_CAMPAIGN=2
VUE_APP_FEATURED_CAMPAIGN=1
VUE_APP_LETTER_TEMPLATE=tmpl_951e09eb07bfd24

POSTGRES_USER=postgres
Expand All @@ -35,4 +35,5 @@ POSTGRES_PORT=5432
POSTGRES_HOST=amplify_db

# Enable $0 transactions (set to 'on' to enable, used in both FE and BE)
VUE_APP_EMPTY_TRANSACTIONS=
VUE_APP_EMPTY_TRANSACTIONS=on
VUE_APP_NO_COST_MAIL=true
18 changes: 11 additions & 7 deletions src/components/DonateMoney.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

<v-col cols="12" class="py-2">
<p v-if="noCostMailEnabled">
Your voice is super important - please use this code
<strong>{{ couponCode }}</strong> to send email and letter for free!
Donations are optional and 100% goes to Save California Salmon 🙂
Your voice is super important!
<span v-if="couponCode">
Please use this code <strong>{{ couponCode }}</strong> to send email
and letter for free!
</span>
Donations are optional and 100% goes to {{ campaign.name }} 🙂
</p>

<p v-else>
Expand Down Expand Up @@ -79,9 +82,7 @@
</div>
</v-col>
<div>
<v-btn outlined color="primary" text @click="submit()">
Send Mail
</v-btn>
<v-btn outlined color="primary" text @click="submit()"> Send Mail </v-btn>
</div>
</section>
</template>
Expand All @@ -103,7 +104,10 @@ export default {
computed: {
// These are temporary structures until we can reorganize the frontend.
noCostMailEnabled() {
return process.env.VUE_APP_NO_COST_MAIL
return Boolean(process.env.VUE_APP_NO_COST_MAIL)
},
campaign() {
return this.$store.state.campaign
},
couponCode() {
return process.env.VUE_APP_COUPON_CODE
Expand Down

0 comments on commit 9bd9129

Please sign in to comment.