From cb4c879eda6014ee89cfd859a3aaa7b44146efc6 Mon Sep 17 00:00:00 2001 From: ArneBo Date: Fri, 14 Feb 2025 10:22:01 +0100 Subject: [PATCH] fix(front): remove unused router redirections after moving ui modules to this repo #2355 --- front/src/components/album/Card.vue | 9 --------- front/src/components/podcast/Card.vue | 8 -------- front/src/components/radio/Card.vue | 7 ------- front/src/components/ui/Activity.vue | 11 ----------- 4 files changed, 35 deletions(-) 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 } }) -} -