Skip to content

Commit

Permalink
fix: remove bit
Browse files Browse the repository at this point in the history
  • Loading branch information
stats.fm Team committed Jul 8, 2024
1 parent d894e16 commit 1489462
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 87 deletions.
32 changes: 3 additions & 29 deletions src/pages/album/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { GetServerSideProps, NextPage } from 'next';
import type { FC } from 'react';
import { useEffect, useMemo, useState } from 'react';
import type * as statsfm from '@/utils/statsfm';

Expand All @@ -23,31 +22,7 @@ import formatter from '@/utils/formatter';

import dayjs from 'dayjs';
import { TopListeners } from '@/components/TopListeners';

const BandsInTown: FC<{ album: statsfm.Album }> = ({ album }) => {
return (
<div>
<div id="amplified_100006348"></div>
<script
dangerouslySetInnerHTML={{
__html: `
window.amplified = window.amplified || {init: []};
amplified.init.push(function() {
amplified.setParams({
artist: "${album?.artists[0]?.name}",
song: "",
album: "${album?.name}",
hostname: "srv.clickfuse.com",
})
.pushAdUnit(100006348)
.run();
});
`,
}}
/>
</div>
);
};
import { SpotifyLink, AppleMusicLink } from '@/components/SocialLink';

type Props = SSRProps & {
album: statsfm.Album;
Expand Down Expand Up @@ -219,7 +194,7 @@ const Album: NextPage<Props> = ({ album, tracks }) => {
{album.name}
</h1>
<div className="mt-2 flex flex-row items-center gap-2">
{/* {(album.externalIds.spotify ?? []).length > 0 && (
{(album.externalIds.spotify ?? []).length > 0 && (
<SpotifyLink
path={`/album/${album.externalIds.spotify![0]}`}
/>
Expand All @@ -230,8 +205,7 @@ const Album: NextPage<Props> = ({ album, tracks }) => {
album.externalIds.appleMusic![0]
}`}
/>
)} */}
<BandsInTown album={album} />
)}
</div>
</div>
</section>
Expand Down
32 changes: 3 additions & 29 deletions src/pages/artist/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,7 @@ import { ArtistTopTracks } from '@/components/Artist/ArtistTopTracks';
import { ArtistTopAlbums } from '@/components/Artist/ArtistTopAlbums';
import { TopListeners } from '@/components/TopListeners';
import { ArtistRelatedArtists } from '@/components/Artist/ArtistRelatedArtists';

const BandsInTown: FC<{ artist: statsfm.Artist }> = ({ artist }) => {
return (
<div>
<script async src="//srv.clickfuse.com/ads/ads.js"></script>
<div id="amplified_100006348"></div>
<script
dangerouslySetInnerHTML={{
__html: `
window.amplified = window.amplified || {init: []};
amplified.init.push(function() {
amplified.setParams({
artist: "${artist?.name}",
song: "",
album: "",
hostname: "srv.clickfuse.com",
})
.pushAdUnit(100006348)
.run();
});
`,
}}
/>
</div>
);
};
import { SpotifyLink, AppleMusicLink } from '@/components/SocialLink';

const Genres: FC<Pick<statsfm.Artist, 'genres'>> = ({ genres }) => (
<Section title="Genres">
Expand Down Expand Up @@ -229,7 +204,7 @@ const Artist: NextPage<Props> = ({ artist, origin }) => {
</span>

<div className="mt-2 flex flex-row items-center gap-2">
{/* {(artist.externalIds.spotify ?? []).length > 0 && (
{(artist.externalIds.spotify ?? []).length > 0 && (
<SpotifyLink
path={`/artist/${artist.externalIds.spotify![0]}`}
/>
Expand All @@ -240,8 +215,7 @@ const Artist: NextPage<Props> = ({ artist, origin }) => {
artist.externalIds.appleMusic![0]
}`}
/>
)} */}
<BandsInTown artist={artist} />
)}
</div>
</div>
</section>
Expand Down
32 changes: 3 additions & 29 deletions src/pages/track/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,7 @@ import { Radar } from 'react-chartjs-2';
import { TopListeners } from '@/components/TopListeners';
import { MdHearingDisabled } from 'react-icons/md';
import Link from 'next/link';

const BandsInTown: FC<{ track: statsfm.Track }> = ({ track }) => {
return (
<div>
<script async src="//srv.clickfuse.com/ads/ads.js"></script>
<div id="amplified_100006348"></div>
<script
dangerouslySetInnerHTML={{
__html: `
window.amplified = window.amplified || {init: []};
amplified.init.push(function() {
amplified.setParams({
artist: "${track?.artists[0]?.name}",
song: "${track?.name}",
album: "${track?.albums[0]?.name}",
hostname: "srv.clickfuse.com",
})
.pushAdUnit(100006348)
.run();
});
`,
}}
/>
</div>
);
};
import { SpotifyLink, AppleMusicLink } from '@/components/SocialLink';

const AudioFeaturesRadarChart = ({
acousticness,
Expand Down Expand Up @@ -327,7 +302,7 @@ const Track: NextPage<Props> = ({ track }) => {
{track.name}
</h1>
<div className="mt-2 flex flex-row items-center gap-2">
{/* {(track.externalIds.spotify ?? []).length > 0 && (
{(track.externalIds.spotify ?? []).length > 0 && (
<SpotifyLink
path={`/track/${track.externalIds.spotify![0]}`}
/>
Expand All @@ -338,8 +313,7 @@ const Track: NextPage<Props> = ({ track }) => {
track.externalIds.appleMusic![0]
}`}
/>
)} */}
<BandsInTown track={track} />
)}
</div>
</div>
</section>
Expand Down

0 comments on commit 1489462

Please sign in to comment.