Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
istar410 committed Oct 28, 2023
1 parent febfc83 commit 4ed1703
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ const openModal = () => {
<button class="form-btn" type="button" @click="login_user">
Se connecter
</button>
<a class="p-1 hover:cursor-pointer hover:text-blue-800" @click="openModal()">Mot de passe oublié?</a>
<button type="button" class="p-1 hover:cursor-pointer hover:text-blue-800" @click="openModal()">
Mot de passe oublié ?
</button>
</div>

<Modal v-if="modal_open" @close="closeModal">
Expand Down
5 changes: 4 additions & 1 deletion src/views/Me.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { storeToRefs } from 'pinia';
import {
computed, onMounted, reactive, ref,
} from 'vue';
import type { User } from '@/models/user';
import FormField from '../components/FormField.vue';
import Modal from '../components/Modal.vue';
Expand All @@ -17,7 +18,9 @@ const { user, role, inscriptions } = storeToRefs(userStore);
const { fetch_user_inscription_full, patch_user } = userStore;
onMounted(async () => {
await fetch_user_inscription_full(user.value.id);
if (Object.hasOwn(user.value, 'id')) {
await fetch_user_inscription_full((user.value as User).id);
}
});
// Register form validation
Expand Down

0 comments on commit 4ed1703

Please sign in to comment.