mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 20:30:54 -05:00
Redirect to event page after reporting winners
This commit is contained in:
parent
8269288cb2
commit
d45db1527a
4
TODO.md
4
TODO.md
|
|
@ -23,8 +23,8 @@ Calendar
|
|||
|
||||
## Other
|
||||
|
||||
- [ ] Refactor Avatar to accept player object instead of separate fields
|
||||
- [ ] Redirect to event page after submitting results
|
||||
- [ ] can submit results with one invalid linked user
|
||||
- [x] Redirect to event page after submitting results
|
||||
- [x] date input take in account time zone difference between server and client
|
||||
- [x] User selector allow passing users from top level
|
||||
- [x] Constants use CALENDAR_EVENT object
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
import { type ActionFunction, type LoaderArgs, json } from "@remix-run/node";
|
||||
import {
|
||||
type ActionFunction,
|
||||
type LoaderArgs,
|
||||
json,
|
||||
redirect,
|
||||
} from "@remix-run/node";
|
||||
import { Form, useLoaderData } from "@remix-run/react";
|
||||
import { z } from "zod";
|
||||
import { Label } from "~/components/Label";
|
||||
|
|
@ -22,6 +27,7 @@ import { FormMessage } from "~/components/FormMessage";
|
|||
import { FormErrors } from "~/components/FormErrors";
|
||||
import type { UseDataFunctionReturn } from "@remix-run/react/dist/components";
|
||||
import type { Unpacked } from "~/utils/types";
|
||||
import { calendarEventPage } from "~/utils/urls";
|
||||
|
||||
const playersSchema = z
|
||||
.array(
|
||||
|
|
@ -114,7 +120,7 @@ export const action: ActionFunction = async ({ request, params }) => {
|
|||
})),
|
||||
});
|
||||
|
||||
return null;
|
||||
return redirect(calendarEventPage(parsedParams.id));
|
||||
};
|
||||
|
||||
export const handle = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user