Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
feat: prefill redeem code
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartkloock committed Sep 12, 2024
1 parent 09f3083 commit c4da509
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/views/store/StoreRedeem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</template>

<script setup lang="ts">
import { ref } from "vue";
import { onMounted, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useActor } from "@/store/actor";
Expand All @@ -47,6 +47,14 @@ const router = useRouter();
const egv = useEgVault();
const modal = useModal();
onMounted(() => {
const codeParam = router.currentRoute.value.query.code;
if (codeParam && typeof codeParam === "string") {
code.value = codeParam;
}
});
const submit = () => {
if (!code.value) return;
Expand Down

0 comments on commit c4da509

Please sign in to comment.