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();