arcana type magic
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user