redirect to homepage after creating a sondage

This commit is contained in:
Arenmg 2021-05-10 15:10:46 +03:00
parent 1837aa5cc6
commit f3dae6a1ce

View file

@ -135,7 +135,7 @@ const getUrl = window.location;
// if (baseUrl.endsWith("/")) { // if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1); // baseUrl = baseUrl.slice(0, -1);
// } // }
let baseUrl = getUrl.protocol + "//" + getUrl.host let baseUrl = getUrl.protocol + "//" + getUrl.host;
module.exports = { module.exports = {
data() { data() {
return { return {
@ -179,7 +179,9 @@ module.exports = {
this.url = ""; this.url = "";
this.selectedDate = new Date(); this.selectedDate = new Date();
swal("Succès!", "L'agenda a été créé", "success"); swal("Succès!", "L'agenda a été créé", "success").then((value) => {
location.href = baseUrl;
});
} catch (error) { } catch (error) {
swal("Erreur!", `${error}`, "error"); swal("Erreur!", `${error}`, "error");
console.error(error); console.error(error);