mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-24 03:55:49 -05:00
Enable v2_normalizeFormMethod
This commit is contained in:
@@ -30,7 +30,7 @@ import { findOwnTeam } from "../queries/findOwnTeam.server";
|
||||
import { findSubsByTournamentId } from "~/features/tournament-subs";
|
||||
|
||||
export const shouldRevalidate: ShouldRevalidateFunction = (args) => {
|
||||
const wasMutation = args.formMethod === "post";
|
||||
const wasMutation = args.formMethod === "POST";
|
||||
const wasOnMatchPage = args.formAction?.includes("matches");
|
||||
|
||||
if (wasMutation && wasOnMatchPage) {
|
||||
|
||||
@@ -143,7 +143,7 @@ export interface PlusSuggestionsLoaderData {
|
||||
|
||||
export const shouldRevalidate: ShouldRevalidateFunction = ({ formMethod }) => {
|
||||
// only reload if form submission not when user changes tabs
|
||||
return Boolean(formMethod && formMethod !== "get");
|
||||
return Boolean(formMethod && formMethod !== "GET");
|
||||
};
|
||||
|
||||
export const loader: LoaderFunction = async ({ request }) => {
|
||||
|
||||
@@ -98,5 +98,6 @@ module.exports = {
|
||||
serverModuleFormat: "cjs",
|
||||
future: {
|
||||
v2_meta: true,
|
||||
v2_normalizeFormMethod: true,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user