Skip to content

Commit

Permalink
Fix playlist images not rendering - fixes #6
Browse files Browse the repository at this point in the history
WIll need to be reverted when V3 drops
  • Loading branch information
Bergbok committed Apr 30, 2024
1 parent 1cc5af6 commit 995051e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CustomApps/playlist-tags/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playlist-tags",
"version": "1.6.6",
"version": "1.6.7",
"private": true,
"scripts": {
"build": "spicetify-creator",
Expand Down
2 changes: 1 addition & 1 deletion CustomApps/playlist-tags/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const App = () => {
const [timeoutID, setTimeoutID] = useState<number | null>(null);

useEffect(() => {
const expFeatures = JSON.parse(localStorage.getItem('spicetify-exp-features') || '{}');
const expFeatures = JSON.parse(Spicetify.LocalStorage.get('spicetify-exp-features') || '{}');
const navBarValue = expFeatures.enableGlobalNavBar?.value;
setNavBarValue(navBarValue);
}, []);
Expand Down
13 changes: 4 additions & 9 deletions CustomApps/playlist-tags/src/components/spotify_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface SpotifyCardProps {
function SpotifyCard(props: SpotifyCardProps): React.ReactElement<HTMLDivElement> {
// @ts-ignore
const { Cards, TextComponent, ArtistMenu, AlbumMenu, PodcastShowMenu, PlaylistMenu, ContextMenu } = Spicetify.ReactComponent;
const { Default: Card, CardImage } = Cards;
const { FeatureCard: Card, CardImage } = Cards;
const { type, header, uri, imageUrl, subheader, className } = props;

const Menu = () => {
Expand All @@ -60,13 +60,8 @@ function SpotifyCard(props: SpotifyCardProps): React.ReactElement<HTMLDivElement
headerText={header}
renderCardImage={() => (
<CardImage
images={[
{
height: 640,
url: imageUrl,
width: 640,
},
]}
src={imageUrl}
size={640}
isCircular={type === "artist"}/>
)}
renderSubHeaderContent={() => (
Expand Down Expand Up @@ -96,4 +91,4 @@ function SpotifyCard(props: SpotifyCardProps): React.ReactElement<HTMLDivElement
);
}

export default SpotifyCard;
export default SpotifyCard;

0 comments on commit 995051e

Please sign in to comment.