Skip to content

Commit

Permalink
use route.fullPath instead of window.location.pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Feb 22, 2024
1 parent 83ca1a5 commit a9cb3d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/Login/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import axios from "axios";
import { capitalize } from "lodash";
import { computed, ref } from "vue";
import { useRoute } from "vue-router/composables";
import { useConfig } from "@/composables/config";
import { Toast } from "@/composables/toast";
Expand Down Expand Up @@ -39,6 +40,7 @@ const emit = defineEmits<{
const urlParams = new URLSearchParams(window.location.search);
const { config } = useConfig();
const route = useRoute();
const login = ref<string | null>(null);
const password = ref<string | null>(null);
Expand Down Expand Up @@ -83,7 +85,7 @@ function submitLogin(formLogin: string | null, formPassword: string | null) {
if (localStorage.getItem("redirect_url")) {
redirect = localStorage.getItem("redirect_url")!;
}
const currentPath = window.location.pathname;
const currentPath = route.fullPath;
axios
.post(withPrefix("/user/login"), {
login: login.value,
Expand Down

0 comments on commit a9cb3d7

Please sign in to comment.