diff --git a/front/src/components/album/Card.vue b/front/src/components/album/Card.vue index 415c184f7..597c0b177 100644 --- a/front/src/components/album/Card.vue +++ b/front/src/components/album/Card.vue @@ -27,18 +27,9 @@ const props = defineProps() const { album } = props -let navigate = (to: 'artist' | 'album') => {} - const artist_credit = album.artist_credit || [] const firstArtist = artist_credit.length > 0 ? artist_credit[0].artist : null -if (import.meta.env.PROD) { - const router = useRouter() - navigate = (to: 'artist' | 'album') => to === 'album' - ? router.push({ name: 'library.albums.detail', params: { id: album.id } }) - : router.push({ name: 'library.artists.detail', params: { id: firstArtist?.id } }) -} - const store = useStore() const imageUrl = computed(() => props.album.cover?.urls.original ? store.getters['instance/absoluteUrl'](props.album.cover?.urls.large_square_crop) diff --git a/front/src/components/podcast/Card.vue b/front/src/components/podcast/Card.vue index 4514cada3..0ffb342b4 100644 --- a/front/src/components/podcast/Card.vue +++ b/front/src/components/podcast/Card.vue @@ -9,14 +9,6 @@ import Card from '~/components/ui/Card.vue' const { podcast } = defineProps<{ podcast: Channel }>() const timeAgo = useTimeAgo(new Date(podcast.artist?.modification_date ?? new Date())) - -let navigate = () => {} - -if (import.meta.env.PROD) { - const router = useRouter() - navigate = () => router.push({ name: 'library.artists.detail', params: { id: podcast.artist?.id } }) -} -