-
+
Judge Justice: {song.judgeJustice}
-
+
Judge Attack: {song.judgeAttack}
-
+
Miss: {song.judgeGuilty}
diff --git a/app/(sharing)/[token]/token.ts b/app/(sharing)/[token]/token.ts
index c023439..b643764 100644
--- a/app/(sharing)/[token]/token.ts
+++ b/app/(sharing)/[token]/token.ts
@@ -8,8 +8,8 @@ import { redirect } from "next/navigation";
export async function generateShareToken(id: number): Promise<{
token?: string;
- id?: string;
- error?: string;
+ id?: string;
+ error?: string;
}> {
const { user } = await getAuth();
@@ -24,10 +24,10 @@ export async function generateShareToken(id: number): Promise<{
// generate token logic
const token = await daphnis.linkSharingToken.create({
data: {
- playlogId: id, // sets the playlog id
- id: randomUUID(), // generates a random primary id for the share token
- userId: user.id, // attaches the userid from daphnis
- token: gernatetoken, // makes an expirable token thats added to the token column
+ playlogId: id, // sets the playlog id
+ id: randomUUID(), // generates a random primary id for the share token
+ userId: user.id, // attaches the userid from daphnis
+ token: gernatetoken, // makes an expirable token thats added to the token column
createdAt: new Date(), // created at date
},
});
@@ -49,21 +49,21 @@ export async function shareScore(token: string) {
}
// Check if token has expired
- const tokenAge =
- new Date().getTime() - new Date(PublicPage.createdAt).getTime();
- const tokenAgeLimit = 1000 * 60 * 60 * 24; // 1 day in milliseconds
+ // const tokenAge =
+ // new Date().getTime() - new Date(PublicPage.createdAt).getTime();
+ // const tokenAgeLimit = 1000 * 60 * 60 * 24; // 1 day in milliseconds
- if (tokenAge > tokenAgeLimit) {
- await daphnis.linkSharingToken.update({
- where: {
- token,
- },
- data: {
- tokenExpiredAt: new Date(),
- },
- });
- redirect("/");
- }
+ // if (tokenAge > tokenAgeLimit) {
+ // await daphnis.linkSharingToken.update({
+ // where: {
+ // token,
+ // },
+ // data: {
+ // tokenExpiredAt: new Date(),
+ // },
+ // });
+ // redirect("/");
+ // }
return { success: true };
}
diff --git a/components/scoreplaylog/colums.tsx b/components/scoreplaylog/colums.tsx
index f05e7fe..a5a3581 100644
--- a/components/scoreplaylog/colums.tsx
+++ b/components/scoreplaylog/colums.tsx
@@ -33,14 +33,14 @@ export const columns: ColumnDef
[] = [
const jacketPath = row.original.jacketPath?.replace(".dds", ".png");
const [isLoading, setIsLoading] = useState(true);
return (
-
+
{!jacketPath ? (
-
+
) : (
)}
{row.original.title}
@@ -149,10 +149,8 @@ export const columns: ColumnDef
[] = [
{
id: "actions",
- header: () => More
,
+ header: () => More
,
cell: ({ row }) => {
- const song = row.original;
- // eslint-disable-next-line react-hooks/rules-of-hooks
const [error, setError] = useState("");
// eslint-disable-next-line react-hooks/rules-of-hooks
const router = useRouter();