File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 99 getErrorForNotes ,
1010 getErrorForTitle ,
1111} from '#app/utils/call-kent.ts'
12+ import { getStringFormValue } from '#app/utils/misc.ts'
1213import { useRootData } from '#app/utils/use-root-data.ts'
1314
1415export const recordingFormActionPath = '/resources/calls/save'
@@ -379,9 +380,3 @@ export function RecordingForm({
379380 </ div >
380381 )
381382}
382-
383- function getStringFormValue ( formData : FormData , key : string ) {
384- const value = formData . get ( key )
385- return typeof value === 'string' ? value : null
386- }
387-
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 getDomainUrl ,
2121 getErrorMessage ,
2222 getOptionalTeam ,
23+ getStringFormValue ,
2324} from '#app/utils/misc.ts'
2425import { prisma } from '#app/utils/prisma.server.ts'
2526import { sendEmail } from '#app/utils/send-email.server.ts'
@@ -30,11 +31,6 @@ import { type Route } from './+types/save'
3031
3132type ActionData = RecordingFormData
3233
33- function getStringFormValue ( formData : FormData , key : string ) {
34- const value = formData . get ( key )
35- return typeof value === 'string' ? value : null
36- }
37-
3834function getCheckboxFormValue ( formData : FormData , key : string ) {
3935 const value = formData . get ( key )
4036 // HTML checkboxes submit the value only when checked (default "on").
Original file line number Diff line number Diff line change @@ -88,6 +88,11 @@ export function getErrorMessage(
8888 return fallback
8989}
9090
91+ export function getStringFormValue ( formData : FormData , key : string ) {
92+ const value = formData . get ( key )
93+ return typeof value === 'string' ? value : null
94+ }
95+
9196export function getErrorStack (
9297 error : unknown ,
9398 fallback : string = 'Unknown Error' ,
You can’t perform that action at this time.
0 commit comments