Skip to content

Commit

Permalink
fix: use dev iterable list for testing and replace icon for materialUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Jan 8, 2024
1 parent 815218c commit b3e2fcd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
8 changes: 0 additions & 8 deletions src/assets/icons/inline/check-circle.svg

This file was deleted.

22 changes: 15 additions & 7 deletions src/components/Thanks/NotifyMe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
:variant="variant"
@click="notify"
>
<check-mark v-if="addedToIterable" class="tw-text-white tw-mr-1" />
<kv-material-icon
v-if="addedToIterable"
class="tw-w-2.5 tw-h-2.5 tw-mr-1"
:icon="mdiCheckCircleOutline"
/>
<span>{{ buttonCta }}</span>
</kv-button>
</div>
Expand All @@ -54,20 +58,21 @@
<script>
import KvProgressCircle from '@/components/Kv/KvProgressCircle';
import MailIcon from '@/assets/icons/inline/thanks-mail.svg';
import CheckMark from '@/assets/icons/inline/check-circle.svg';
import teamGoalInfo from '@/plugins/team-goal-mixin';
import { mdiCheckCircleOutline } from '@mdi/js';
import KvButton from '~/@kiva/kv-components/vue/KvButton';
import KvPageContainer from '~/@kiva/kv-components/vue/KvPageContainer';
import KvGrid from '~/@kiva/kv-components/vue/KvGrid';
import KvMaterialIcon from '~/@kiva/kv-components/vue/KvMaterialIcon';
export default {
name: 'NotifyMe',
inject: ['apollo'],
mixins: [teamGoalInfo],
components: {
KvProgressCircle,
KvMaterialIcon,
MailIcon,
CheckMark,
KvButton,
KvPageContainer,
KvGrid
Expand All @@ -80,9 +85,9 @@ export default {
},
data() {
return {
iterableListIdString: '0daedc50-6b66-44de-898d-fc7365f64da5',
addedToIterable: false,
loading: false,
mdiCheckCircleOutline
};
},
computed: {
Expand All @@ -91,12 +96,15 @@ export default {
},
buttonState() {
if (this.loading) return 'loading';
if (this.addedToIterable) return 'success';
return '';
},
variant() {
return this.addedToIterable ? 'secondary' : 'primary';
},
iterableListIdString() {
const isProd = window.location.hostname === 'www.kiva.org';
return isProd ? '0daedc50-6b66-44de-898d-fc7365f64da5' : '84945c52-fd49-4ae8-9ab6-4daa11eb6052';
}
},
methods: {
async notify() {
Expand All @@ -110,7 +118,7 @@ export default {
});
if (response.status === 200) {
this.addedToIterable = true;
this.$showTipMsg(`We will notify ${this.email} when the challenge is announced!`);
this.$showTipMsg(`We will notify ${this.email} when the next challenge is announced!`);
} else {
this.$showTipMsg('There was a problem. Please try again.', 'error');
}
Expand All @@ -122,7 +130,7 @@ export default {

<style lang="postcss" scoped>
.notify-button >>> span {
@apply tw-flex;
@apply tw-flex tw-items-center;
}
.container {
Expand Down

0 comments on commit b3e2fcd

Please sign in to comment.