made playlog table dynamic
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
import ChunithmData from "@/components/scoreplaylog/page";
|
||||
import React from "react";
|
||||
import ChunithmData from "../../../components/scoreplaylog/page";
|
||||
|
||||
const ChunithmPage = async () => {
|
||||
return (
|
||||
<div>
|
||||
<div className=" ">
|
||||
<ChunithmData />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { getAuth } from "@/auth/queries/getauth";
|
||||
import { generatePlaylogId, getSongsWithTitles } from "@/lib/api";
|
||||
import { shareScore } from "../token";
|
||||
|
||||
@ -16,7 +17,17 @@ export default async function Share({
|
||||
return <p>{tokenResult.error}</p>;
|
||||
}
|
||||
|
||||
const userId = 10000;
|
||||
|
||||
const { user } = await getAuth();
|
||||
|
||||
|
||||
if (!user?.UserId) {
|
||||
return {
|
||||
error:"no user id"
|
||||
}
|
||||
}
|
||||
|
||||
const userId = user?.UserId;
|
||||
const playlogId = parseInt(id);
|
||||
|
||||
const songsData = await getSongsWithTitles(userId);
|
||||
|
Reference in New Issue
Block a user