Skip to content

Commit

Permalink
fix(stats/playlist): remove error-causing spotify components
Browse files Browse the repository at this point in the history
  • Loading branch information
harbassan committed Apr 6, 2024
1 parent d42a097 commit e3dfdc7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 56 deletions.
94 changes: 47 additions & 47 deletions stats/src/pages/playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,53 +158,53 @@ const PlaylistPage = ({ uri }: { uri: string }) => {
});

return (
<QueryClientProvider client={new QueryClient()}>
<Router
location={{
pathname: "/",
}}
navigator={History}
>
<StoreProvider store={ReduxStore}>
<PlatformProvider platform={_platform}>
<Routes>
<Route
path="/"
element={
<div className="page-content encore-dark-theme encore-base-set">
<section className="stats-libraryOverview">
<StatCard label="Total Tracks" value={library.trackCount.toString()} />
<StatCard label="Total Artists" value={library.artistCount.toString()} />
<StatCard
label="Total Minutes"
value={Math.floor(library.totalDuration / 60).toString()}
/>
<StatCard
label="Total Hours"
value={(library.totalDuration / (60 * 60)).toFixed(1)}
/>
</section>
<Shelf title="Most Frequent Genres">
<GenresCard genres={library.genres} total={library.genresDenominator} />
<InlineGrid special>{statCards}</InlineGrid>
</Shelf>
<Shelf title="Most Frequent Artists">
<InlineGrid>{artistCards}</InlineGrid>
</Shelf>
<Shelf title="Most Frequent Albums">
<InlineGrid>{albumCards}</InlineGrid>
</Shelf>
<Shelf title="Release Year Distribution">
<GenresCard genres={library.years} total={library.yearsDenominator} />
</Shelf>
</div>
}
/>
</Routes>
</PlatformProvider>
</StoreProvider>
</Router>
</QueryClientProvider>
// <QueryClientProvider client={new QueryClient()}>
// <Router
// location={{
// pathname: "/",
// }}
// navigator={History}
// >
// <StoreProvider store={ReduxStore}>
// <PlatformProvider platform={_platform}>
// <Routes>
// <Route
// path="/"
// element={
<div id="stats-app" className="page-content encore-dark-theme encore-base-set">
<section className="stats-libraryOverview">
<StatCard label="Total Tracks" value={library.trackCount.toString()} />
<StatCard label="Total Artists" value={library.artistCount.toString()} />
<StatCard
label="Total Minutes"
value={Math.floor(library.totalDuration / 60).toString()}
/>
<StatCard
label="Total Hours"
value={(library.totalDuration / (60 * 60)).toFixed(1)}
/>
</section>
<Shelf title="Most Frequent Genres">
<GenresCard genres={library.genres} total={library.genresDenominator} />
<InlineGrid special>{statCards}</InlineGrid>
</Shelf>
{/* <Shelf title="Most Frequent Artists">
<InlineGrid>{artistCards}</InlineGrid>
</Shelf>
<Shelf title="Most Frequent Albums">
<InlineGrid>{albumCards}</InlineGrid>
</Shelf> */}
<Shelf title="Release Year Distribution">
<GenresCard genres={library.years} total={library.yearsDenominator} />
</Shelf>
</div>
// }
// />
// </Routes>
// </PlatformProvider>
// </StoreProvider>
// </Router>
// </QueryClientProvider>
);
};

Expand Down
17 changes: 8 additions & 9 deletions stats/src/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,16 @@
font-size: 0.875rem;
}

.GenericModal[aria-label="Playlist Stats"] .main-embedWidgetGenerator-container {
width: 80vw;
height: 80vh;
background-color: var(--spice-main);
}
.GenericModal[aria-label="Playlist Stats"] .main-shelf-title {
color: var(--spice-text);
}

.stats-genreCard + .stats-gridInlineSection {
margin-top: 3px;
}
}

.GenericModal[aria-label="Playlist Stats"] .main-embedWidgetGenerator-container {
width: 80vw;
height: 80vh;
background-color: var(--spice-main);
}
.GenericModal[aria-label="Playlist Stats"] .main-shelf-title {
color: var(--spice-text);
}

0 comments on commit e3dfdc7

Please sign in to comment.