Compare commits

..

1 commit

Author SHA1 Message Date
trafficlunar
f71f8c82ae
Merge 0b1516e930 into a6c2d924f1 2026-02-24 16:42:15 +00:00
3 changed files with 797 additions and 565 deletions

View file

@ -16,7 +16,7 @@
"@bprogress/next": "^3.2.12", "@bprogress/next": "^3.2.12",
"@hello-pangea/dnd": "^18.0.1", "@hello-pangea/dnd": "^18.0.1",
"@prisma/client": "^6.19.2", "@prisma/client": "^6.19.2",
"@sentry/nextjs": "^10.40.0", "@sentry/nextjs": "^10.39.0",
"bit-buffer": "^0.3.0", "bit-buffer": "^0.3.0",
"canvas-confetti": "^1.9.4", "canvas-confetti": "^1.9.4",
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
@ -35,24 +35,24 @@
"seedrandom": "^3.0.5", "seedrandom": "^3.0.5",
"sharp": "^0.34.5", "sharp": "^0.34.5",
"sjcl-with-all": "1.0.8", "sjcl-with-all": "1.0.8",
"swr": "^2.4.1", "swr": "^2.4.0",
"zod": "^4.3.6" "zod": "^4.3.6"
}, },
"devDependencies": { "devDependencies": {
"@eslint/eslintrc": "^3.3.4", "@eslint/eslintrc": "^3.3.3",
"@iconify/react": "^6.0.2", "@iconify/react": "^6.0.2",
"@tailwindcss/postcss": "^4.2.1", "@tailwindcss/postcss": "^4.2.0",
"@types/canvas-confetti": "^1.9.0", "@types/canvas-confetti": "^1.9.0",
"@types/node": "^25.3.3", "@types/node": "^25.3.0",
"@types/react": "^19.2.14", "@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.2.3",
"@types/seedrandom": "^3.0.8", "@types/seedrandom": "^3.0.8",
"@types/sjcl": "^1.0.34", "@types/sjcl": "^1.0.34",
"eslint": "^10.0.2", "eslint": "^10.0.1",
"eslint-config-next": "16.1.6", "eslint-config-next": "16.1.6",
"prisma": "^6.19.2", "prisma": "^6.19.2",
"schema-dts": "^1.1.5", "schema-dts": "^1.1.5",
"tailwindcss": "^4.2.1", "tailwindcss": "^4.2.0",
"typescript": "^5.9.3" "typescript": "^5.9.3"
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -19,26 +19,26 @@ export const metadata: Metadata = {
}; };
export default async function SubmitPage() { export default async function SubmitPage() {
const session = await auth(); // const session = await auth();
if (!session) redirect("/login"); // if (!session) redirect("/login");
if (!session.user.username) redirect("/create-username"); // if (!session.user.username) redirect("/create-username");
const activePunishment = await prisma.punishment.findFirst({ // const activePunishment = await prisma.punishment.findFirst({
where: { // where: {
userId: Number(session?.user.id), // userId: Number(session?.user.id),
returned: false, // returned: false,
}, // },
}); // });
if (activePunishment) redirect("/off-the-island"); // if (activePunishment) redirect("/off-the-island");
// Check if submissions are disabled // Check if submissions are disabled
let value: boolean | null = true; let value: boolean | null = true;
try { // try {
const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`); // const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`);
value = await response.json(); // value = await response.json();
} catch (error) { // } catch (error) {
return <p>An error occurred!</p>; // return <p>An error occurred!</p>;
} // }
if (!value) if (!value)
return ( return (