fixed misconfigured route (sharing) needed to be in a folder it was affecting everything else woops
This commit is contained in:
@ -41,7 +41,7 @@ export async function shareScore(token: string) {
|
|||||||
|
|
||||||
if (!IsTokenValid) {
|
if (!IsTokenValid) {
|
||||||
return {
|
return {
|
||||||
error: "404",
|
error: "invalid token",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
|||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { MoreHorizontal } from "lucide-react";
|
import { MoreHorizontal } from "lucide-react";
|
||||||
import { generateShareToken } from "@/app/(sharing)/[token]/token";
|
import { generateShareToken } from "@/app/score/(sharing)/[token]/token";
|
||||||
|
|
||||||
interface ActionsCellProps {
|
interface ActionsCellProps {
|
||||||
row: any; //unsure what to use here
|
row: any; //unsure what to use here
|
||||||
@ -25,7 +25,7 @@ const ActionsCell: React.FC<ActionsCellProps> = ({ row }) => {
|
|||||||
if (response.error) {
|
if (response.error) {
|
||||||
setError(response.error);
|
setError(response.error);
|
||||||
} else if (response.token) {
|
} 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");
|
const newTab = window.open(shareUrl, "_blank");
|
||||||
if (newTab) {
|
if (newTab) {
|
||||||
newTab.focus();
|
newTab.focus();
|
||||||
|
Reference in New Issue
Block a user