From 7d80af20eff97515d3d3896e6a407d43bbaa4318 Mon Sep 17 00:00:00 2001 From: Polaris Date: Sat, 7 Sep 2024 01:37:25 -0400 Subject: [PATCH] fixed misconfigured route (sharing) needed to be in a folder it was affecting everything else woops --- app/{ => score}/(sharing)/[token]/[id]/actions.ts | 0 app/{ => score}/(sharing)/[token]/[id]/page.tsx | 0 app/{ => score}/(sharing)/[token]/token.ts | 2 +- components/scoreplaylog/moreAction.tsx | 4 ++-- 4 files changed, 3 insertions(+), 3 deletions(-) rename app/{ => score}/(sharing)/[token]/[id]/actions.ts (100%) rename app/{ => score}/(sharing)/[token]/[id]/page.tsx (100%) rename app/{ => score}/(sharing)/[token]/token.ts (97%) diff --git a/app/(sharing)/[token]/[id]/actions.ts b/app/score/(sharing)/[token]/[id]/actions.ts similarity index 100% rename from app/(sharing)/[token]/[id]/actions.ts rename to app/score/(sharing)/[token]/[id]/actions.ts diff --git a/app/(sharing)/[token]/[id]/page.tsx b/app/score/(sharing)/[token]/[id]/page.tsx similarity index 100% rename from app/(sharing)/[token]/[id]/page.tsx rename to app/score/(sharing)/[token]/[id]/page.tsx diff --git a/app/(sharing)/[token]/token.ts b/app/score/(sharing)/[token]/token.ts similarity index 97% rename from app/(sharing)/[token]/token.ts rename to app/score/(sharing)/[token]/token.ts index f6922cb..fcae6f7 100644 --- a/app/(sharing)/[token]/token.ts +++ b/app/score/(sharing)/[token]/token.ts @@ -41,7 +41,7 @@ export async function shareScore(token: string) { if (!IsTokenValid) { return { - error: "404", + error: "invalid token", }; } diff --git a/components/scoreplaylog/moreAction.tsx b/components/scoreplaylog/moreAction.tsx index 0c35983..d206b82 100644 --- a/components/scoreplaylog/moreAction.tsx +++ b/components/scoreplaylog/moreAction.tsx @@ -10,7 +10,7 @@ import { } from "@/components/ui/dropdown-menu"; import { Button } from "@/components/ui/button"; import { MoreHorizontal } from "lucide-react"; -import { generateShareToken } from "@/app/(sharing)/[token]/token"; +import { generateShareToken } from "@/app/score/(sharing)/[token]/token"; interface ActionsCellProps { row: any; //unsure what to use here @@ -25,7 +25,7 @@ const ActionsCell: React.FC = ({ row }) => { if (response.error) { setError(response.error); } else if (response.token) { - const shareUrl = `/${response.token}/${row.original.id}`; + const shareUrl = `/score/${response.token}/${row.original.id}`; const newTab = window.open(shareUrl, "_blank"); if (newTab) { newTab.focus();