chore: fmt
This commit is contained in:
@@ -27,9 +27,7 @@ export default async function GuideEditPage({
|
||||
const [guide] = await db.select().from(guides).where(eq(guides.id, id));
|
||||
if (!guide) notFound();
|
||||
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -27,9 +27,7 @@ export default async function GuideCreatePage() {
|
||||
MAX(${guides.order})`,
|
||||
})
|
||||
.from(guides);
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -42,9 +42,7 @@ export default async function TlVersionEditPage({
|
||||
if (!type) notFound();
|
||||
if (!ver) notFound();
|
||||
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@ export default async function TlVersionCreatePage({
|
||||
]);
|
||||
if (!type) notFound();
|
||||
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@ export default async function TlTypeEditPage({
|
||||
.where(eq(tierlistTypes.id, typeId));
|
||||
if (!type) notFound();
|
||||
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ export default async function TlTypeCreatePage() {
|
||||
.select({ maxOrder: sql<number>`MAX(${tierlistTypes.order})` })
|
||||
.from(tierlistTypes);
|
||||
|
||||
async function submit(
|
||||
form: FormData,
|
||||
) {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
if (!(await adminCheck())) redirect("/login");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { adminCheck } from "@/lib/auth";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function () {
|
||||
if (!(await adminCheck()))
|
||||
if (!(await adminCheck()))
|
||||
redirect(`/login?next=${encodeURIComponent("/donate/admin")}`);
|
||||
|
||||
const data = await db
|
||||
|
||||
+3
-1
@@ -19,7 +19,9 @@ export function Navbar() {
|
||||
const mobile = useIsMobile();
|
||||
|
||||
if (
|
||||
!/^\/(?:tl(?:\/[a-zA-Z0-9]+)?|rubgram|artifact|guide|donate)$/gm.test(pathname)
|
||||
!/^\/(?:tl(?:\/[a-zA-Z0-9]+)?|rubgram|artifact|guide|donate)$/gm.test(
|
||||
pathname,
|
||||
)
|
||||
)
|
||||
return "";
|
||||
return (
|
||||
|
||||
@@ -4,10 +4,7 @@ import { useProgress } from "@bprogress/next";
|
||||
import { useRouter } from "next/navigation";
|
||||
import posthog from "posthog-js";
|
||||
import { toast } from "sonner";
|
||||
import {
|
||||
submitEndgame,
|
||||
submitEndgamePayment,
|
||||
} from "./api";
|
||||
import { submitEndgame, submitEndgamePayment } from "./api";
|
||||
|
||||
export function EndgameFormWrapper({
|
||||
type,
|
||||
|
||||
+4
-4
@@ -115,6 +115,9 @@
|
||||
"@types/react-dom": "19.2.3",
|
||||
"better-sqlite3": "npm:dry-uninstall"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"[email protected]": "patches/[email protected]"
|
||||
},
|
||||
"trustedDependencies": [
|
||||
"@prisma/client",
|
||||
"@prisma/engines",
|
||||
@@ -122,8 +125,5 @@
|
||||
"esbuild",
|
||||
"prisma",
|
||||
"sharp"
|
||||
],
|
||||
"patchedDependencies": {
|
||||
"[email protected]": "patches/[email protected]"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user