diff --git a/frontend/marketplace/.env.dev b/frontend/marketplace/.env.development similarity index 100% rename from frontend/marketplace/.env.dev rename to frontend/marketplace/.env.development diff --git a/frontend/marketplace/src/components/AuctionSection.vue b/frontend/marketplace/src/components/AuctionSection.vue index 11fffd256..fb33755f1 100644 --- a/frontend/marketplace/src/components/AuctionSection.vue +++ b/frontend/marketplace/src/components/AuctionSection.vue @@ -1,7 +1,6 @@ diff --git a/frontend/marketplace/src/components/NavBar.vue b/frontend/marketplace/src/components/NavBar.vue index 8cb6be7df..c486810eb 100644 --- a/frontend/marketplace/src/components/NavBar.vue +++ b/frontend/marketplace/src/components/NavBar.vue @@ -7,8 +7,7 @@ import SellectWalletModal from "@/components/SellectWalletModal.vue"; import { getWalletFromType } from "@/utils/wallet-utils"; import { useLogto } from "@logto/vue"; -const { signIn, isAuthenticated, signOut, fetchUserInfo, isLoading } = - useLogto(); +const { signIn, isAuthenticated, signOut, fetchUserInfo } = useLogto(); const router = useRoute(); const address = ref(); const addressVisible = ref(); @@ -29,6 +28,7 @@ const openSelectWalletModal = () => { const closeSelectWalletModal = () => { selectWalletModal.value = false; }; + const connect = async () => { let addressLocal = localStorage.getItem("address"); let wallet = localStorage.getItem("wallet"); @@ -82,8 +82,12 @@ const onClickSignIn = () => signIn("http://localhost:5173/callback"); const onClickSignOut = () => signOut("http://localhost:5173"); const getUserInfo = async () => { - const details = await fetchUserInfo(); - userDetails.value = details; + try { + const details = await fetchUserInfo(); + userDetails.value = details; + } catch (error) { + console.error("Error while fetching user info", error) + } }; diff --git a/frontend/marketplace/src/pages/AuctionPage.vue b/frontend/marketplace/src/pages/AuctionPage.vue index 4b9137570..6b68e9573 100644 --- a/frontend/marketplace/src/pages/AuctionPage.vue +++ b/frontend/marketplace/src/pages/AuctionPage.vue @@ -3,7 +3,7 @@ import SearchBar from "@/components/SearchBar.vue"; import AuctionResultsCard from "@/components/AuctionResultsCard.vue"; import CustomAlert from "@/components/CustomAlert.vue"; import CustomPagination from "@/components/CustomPagination.vue"; -import { onMounted, ref } from "vue"; +import { onMounted, ref, computed } from "vue"; import CustomSpinner from "@/components/CustomSpinner.vue"; import { useQuery } from "@vue/apollo-composable"; import gql from "graphql-tag"; @@ -18,6 +18,9 @@ const data = ref(); const filterVal = ref(); const showSpinner = ref(true); const queryBuilder = new ListingsQueryBuilder(); +const totalNrOfAuctions = computed(() => { + return data?.value?.result?.marketplaceListings?.totalCount || 0; +}); const handlePageChange = (currentPage: number) => { pageNumber.value = currentPage; @@ -123,9 +126,7 @@ const handleSearch = (filterValues: any) => {