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
1 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,7 @@ const getUrl = window.location;
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
let baseUrl = getUrl.protocol + "//" + getUrl.host;
module.exports = {
data() {
return {
@ -179,7 +179,9 @@ module.exports = {
this.url = "";
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) {
swal("Erreur!", `${error}`, "error");
console.error(error);