feat: import listens from spotify extended streaming history (#305)

This commit is contained in:
Julian Tölle 2023-10-01 03:35:02 +02:00 committed by GitHub
parent 23d7ea0995
commit 7140cb0679
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 1051 additions and 215 deletions

View file

@ -50,7 +50,7 @@ export const RecentListens: React.FC = () => {
)}
<div>
{recentListens.length > 0 && (
<Table className="table-auto w-full text-base">
<Table className="table-auto w-full">
<TableBody>
{recentListens.map((listen) => (
<ListenItem listen={listen} key={listen.id} />

View file

@ -1,4 +1,5 @@
import React from "react";
import { numberToPercent } from "../../util/numberToPercent";
export interface TopListItemProps {
title: string;
@ -42,9 +43,3 @@ export const TopListItem: React.FC<TopListItemProps> = ({
const isMaxCountValid = (maxCount: number) =>
!(Number.isNaN(maxCount) || maxCount === 0);
const numberToPercent = (ratio: number) =>
ratio.toLocaleString(undefined, {
style: "percent",
minimumFractionDigits: 2,
});