Colors + profile mapping + socialNetworks urls. Missing images

This commit is contained in:
Dominic Villemure
2024-06-30 15:47:43 -04:00
parent 3ce1c0013a
commit 169e2cc160
11 changed files with 119 additions and 61 deletions

View File

@@ -101,7 +101,6 @@
</template>
<script setup>
import {useClient} from "@/plugins/api.js";
import {ref, onMounted, onBeforeUnmount} from "vue";
import {eventBus} from '@/eventBus.js';
import {useRouter} from 'vue-router';
@@ -112,7 +111,6 @@ const currentUserName = ref("Anonyme");
const searchQuery = ref("");
const showSearch = ref(false);
let currentUser = null;
const client = useClient();
const userStore = useUserStore();
const toggleSidebar = () => {
@@ -152,13 +150,10 @@ const logout = () => {
window.location.reload();
};
onMounted(async () => {
try {
currentUser = await userStore.getCurrentUser(client);
currentUserName.value = currentUser.userName;
} catch (error) {
console.log("User not logged");
}
onMounted( () => {
currentUser = userStore.getCurrentUser();
currentUserName.value = currentUser.userName;
document.addEventListener('click', handleClickOutside);
});