add cards & tracks
This commit is contained in:
@@ -12,7 +12,6 @@ import type { BoxState } from '~~/types/types'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const router = useRouter()
|
||||
const boxStates = ref<Record<string, BoxState>>({})
|
||||
|
||||
function openCompilation(id: string) {
|
||||
@@ -20,7 +19,6 @@ function openCompilation(id: string) {
|
||||
for (const key in boxStates.value) {
|
||||
boxStates.value[key] = (key === id) ? 'selected' : 'hide'
|
||||
}
|
||||
window.history.pushState({}, '', '/compilation/' + id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +28,6 @@ function closeCompilation(e: KeyboardEvent) {
|
||||
boxStates.value[key] = 'list'
|
||||
}
|
||||
}
|
||||
window.history.pushState({}, '', '/')
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="mt-8 p-8 w-96">
|
||||
<div class="mt-8 p-8 w-96 flex flex-wrap">
|
||||
<MoleculeCard v-for="track in dataStore.getTracksByCompilationId(compilation.id)" :key="track.id" :track="track" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -13,5 +13,4 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const dataStore = useDataStore()
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user