use tabs to seperate search results

This commit is contained in:
geoffrey45
2022-05-22 19:29:16 +03:00
parent 6ef725c0ae
commit 6a2b87b48c
19 changed files with 463 additions and 346 deletions
@@ -0,0 +1,45 @@
<template>
<div class="artists-results border">
<div class="grid">
<ArtistCard
v-for="artist in search.artists.value"
:key="artist.image"
:artist="artist"
/>
</div>
<LoadMore v-if="search.artists.more" @loadMore="loadMore" />
</div>
</template>
<script setup lang="ts">
import ArtistCard from "../../shared/ArtistCard.vue";
import LoadMore from "./LoadMore.vue";
import useSearchStore from "../../../stores/search";
const search = useSearchStore();
let counter = 0;
function loadMore() {
counter += 6;
search.loadArtists(counter);
}
</script>
<style lang="scss">
.right-search .artists-results {
border-radius: 0.5rem;
padding: $small;
margin-bottom: $small;
.xartist {
background-color: $gray;
}
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.75rem;
}
}
</style>