<script setup>
import { ref, defineProps, onUnmounted, onDeactivated } from "vue";
import { useRouter } from "vue-router";

const props = defineProps({
  album: Object,
  onLeave: Function,
});
const router = useRouter();
// console.log(props.artists);

const click = (id) => {
  props.onLeave?.();
  router.push("/album/" + id);
};
</script>
<template>
  <span
    @click="click(album.id)"
    style="margin-right: 4px; cursor: pointer"
    >{{ album.name }}</span
  >
</template>

<script></script>

<style></style>
