Skip to content

Commit b8a8dce

Browse files
committed
fix: improve code formatting and readability in VolunteerForm and volunteer router
1 parent 9006019 commit b8a8dce

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/components/volunteer/VolunteerForm.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ export default function VolunteerForm({ conferenceId }: VolunteerFormProps) {
6262
onError: (error) => {
6363
const zodError = (
6464
error.data as
65-
| (typeof error.data & {
66-
zodError?: {
67-
fieldErrors?: Record<string, string[]>
68-
formErrors?: string[]
69-
}
70-
})
71-
| undefined
65+
| (typeof error.data & {
66+
zodError?: {
67+
fieldErrors?: Record<string, string[]>
68+
formErrors?: string[]
69+
}
70+
})
71+
| undefined
7272
)?.zodError
7373
setSubmitError({
7474
message: error.message || 'Failed to submit volunteer application',
@@ -139,9 +139,9 @@ export default function VolunteerForm({ conferenceId }: VolunteerFormProps) {
139139

140140
const preferredTasksArray = formData.preferredTasks
141141
? formData.preferredTasks
142-
.split(',')
143-
.map((task) => task.trim())
144-
.filter(Boolean)
142+
.split(',')
143+
.map((task) => task.trim())
144+
.filter(Boolean)
145145
: []
146146

147147
createVolunteerMutation.mutate({

src/server/routers/volunteer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ export const volunteerRouter = router({
261261
organizer: currentConf.organizer,
262262
socialLinks:
263263
Array.isArray(currentConf.socialLinks) &&
264-
currentConf.socialLinks.length > 0 &&
265-
typeof currentConf.socialLinks[0] === 'object'
264+
currentConf.socialLinks.length > 0 &&
265+
typeof currentConf.socialLinks[0] === 'object'
266266
? (currentConf.socialLinks as unknown as Array<{
267-
platform: string
268-
url: string
269-
}>)
267+
platform: string
268+
url: string
269+
}>)
270270
: [],
271271
}
272272
}

0 commit comments

Comments
 (0)