-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change id in token from user id to surveyor id * Create util to transform backend keys and add to apiSlice * Switch EditAccount page to component and connect to backend * Remove email inputs and change spacing
- Loading branch information
1 parent
9164524
commit 45a198f
Showing
9 changed files
with
343 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Transform backend surveyor keys to match surveyor form name fields | ||
*/ | ||
export const transformSurveyorKeys = (data) => { | ||
if (!data) return null; | ||
|
||
const { firstname, lastname, street_address, zipcode, ...rest } = data; | ||
return { | ||
...rest, | ||
firstName: firstname, | ||
lastName: lastname, | ||
streetAddress: street_address, | ||
zipCode: zipcode, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.