refactor: remove explicit any across admin forms and catalog actions
- Type resolveAsChild generically over Base UI render-prop type - Type catalog/rooms/catalog-items Prisma updates with Prisma.*UpdateInput - Type EventForm/PollForm with explicit form-value interfaces - Type EventPrizesManager/PollQuestionsManager with validator input types - All typecheck, lint, and 312 tests pass
This commit is contained in:
@@ -75,9 +75,16 @@ export function PollQuestionsManager({ pollId, questions }: Props) {
|
||||
function handleSubmit(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
if (editingId) {
|
||||
run(() => updatePollQuestion({ id: editingId, ...form } as PollQuestionUpdateInput), {
|
||||
successMessage: "Question updated!",
|
||||
});
|
||||
run(
|
||||
() =>
|
||||
updatePollQuestion({
|
||||
id: editingId,
|
||||
...form,
|
||||
} as PollQuestionUpdateInput),
|
||||
{
|
||||
successMessage: "Question updated!",
|
||||
},
|
||||
);
|
||||
} else {
|
||||
run(() => addPollQuestion(form), {
|
||||
successMessage: "Question added!",
|
||||
|
||||
Reference in New Issue
Block a user