Enable v2_normalizeFormMethod

This commit is contained in:
Kalle
2023-06-17 10:18:33 +03:00
parent e284dcedb9
commit 3965968302
3 changed files with 3 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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 }) => {

View File

@@ -98,5 +98,6 @@ module.exports = {
serverModuleFormat: "cjs",
future: {
v2_meta: true,
v2_normalizeFormMethod: true,
},
};