Skip to content

Commit 486c1c3

Browse files
committed
fix: Pass in params into action
1 parent 3d8d625 commit 486c1c3

File tree

2 files changed

+4
-2
lines changed
  • packages/cli/templates

2 files changed

+4
-2
lines changed

packages/cli/templates/defaults/app/route-templates/html.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ const getRequestHost = (request: Request): string =>
210210
export const action = async ({
211211
request,
212212
context,
213+
params,
213214
}: ActionFunctionArgs): Promise<
214215
{ success: true } | { success: false; errors: string[] }
215216
> => {
@@ -220,7 +221,7 @@ export const action = async ({
220221
const formData = await request.formData();
221222

222223
const system = {
223-
params: {},
224+
params,
224225
search: {},
225226
origin: url.origin,
226227
pathname: url.pathname,

packages/cli/templates/react-router/app/route-templates/html.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ const getRequestHost = (request: Request): string =>
209209
export const action = async ({
210210
request,
211211
context,
212+
params,
212213
}: ActionFunctionArgs): Promise<
213214
{ success: true } | { success: false; errors: string[] }
214215
> => {
@@ -219,7 +220,7 @@ export const action = async ({
219220
const formData = await request.formData();
220221

221222
const system = {
222-
params: {},
223+
params,
223224
search: {},
224225
origin: url.origin,
225226
pathname: url.pathname,

0 commit comments

Comments
 (0)