Skip to content

Commit

Permalink
network error handling on signup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratatinator97 committed Jul 18, 2024
1 parent 21919c3 commit 8583381
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions components/auth/signupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
{{ $t("IHaveRead") }}
<nuxt-link to="/legal-infos/terms-of-use/">{{
$t("TermsOfUse")
}} </nuxt-link>
}} </nuxt-link>
{{ $t("And") }}
<nuxt-link to="/legal-infos/privacy-policy/">{{
$t("PrivacyPolicy")
}}</nuxt-link>.
}}</nuxt-link>.
</p>
</div>
</b-step-item>
Expand Down Expand Up @@ -301,24 +301,32 @@ export default {
this.username = this.credentials.username;
this.password = this.credentials.password;
}
await this.$store.dispatch("getPublicBundles");
console.log(JSON.parse(JSON.stringify(this.$store.getters.getPublicBundles)));
this.selectedBundle = this.$store.getters.getPublicBundles
? this.$store.getters.getPublicBundles[0].id
: null;
try {
await this.$store.dispatch("getPublicBundles");
this.selectedBundle = this.$store.getters.getPublicBundles
? this.$store.getters.getPublicBundles[0].id
: null;
const bundles = this.$store.getters.getPublicBundles;
console.log(JSON.parse(JSON.stringify(bundles)));
this.publicBundles =
await Promise.all(bundles.map(async (bundle) => {
console.log(JSON.parse(JSON.stringify(bundle)));
return this.$store.dispatch("getCollectionFromId", bundle.id)
const bundles = this.$store.getters.getPublicBundles;
this.publicBundles =
await Promise.all(bundles.map(async (bundle) => {
return this.$store.dispatch("getCollectionFromId", bundle.id)
}
));
this.initialization = false;
if (!this.$store.getters.getPublicBundles) {
await this.$store.dispatch("getPublicBundles");
}
));
console.log(JSON.parse(JSON.stringify(this.publicBundles)));
this.initialization = false;
if (!this.$store.getters.getPublicBundles) {
await this.$store.dispatch("getPublicBundles");
} catch (error) {
const notif = this.$buefy.notification.open({
duration: 4500,
message: this.$t("ServerOffline"),
position: "is-top-right",
type: "is-danger",
hasIcon: true,
iconSize: "is-small",
icon: "account",
});
}
},
async updated() { },
Expand Down

0 comments on commit 8583381

Please sign in to comment.