arcana type magic

This commit is contained in:
polaris
2024-06-29 03:02:21 -04:00
parent 22b1c6c8d9
commit bde370314e
3 changed files with 21 additions and 21 deletions

View File

@ -1,4 +1,4 @@
import { SharingPlaylogId, getSongsWithTitles } from "@/lib/api";
import { generatePlaylogId, getSongsWithTitles } from "@/lib/api";
import { shareScore } from "../token";
export default async function Share({
@ -12,7 +12,7 @@ export default async function Share({
const tokenResult = await shareScore(token);
if (tokenResult.error) {
// Handle error appropriately, e.g., render an error message
return <p>{tokenResult.error}</p>;
}
@ -20,13 +20,13 @@ export default async function Share({
const playlogId = parseInt(id);
const songsData = await getSongsWithTitles(userId);
const playlogIds = await SharingPlaylogId(playlogId);
const playlogIds = await generatePlaylogId(playlogId);
const matchingSongs = songsData.filter((song) =>
const matchSongToPlaylogId = songsData.filter((song) =>
playlogIds.includes(song.id)
);
const songTitles = matchingSongs.map((song) => song.title);
const songTitles = matchSongToPlaylogId.map((song) => song.title);
return (
<ul>