Typed updateRecord hook in generic field logic (#3102)
* Typed updateRecord hook in generic field logic * Use sanitize instead of additional optimisticInput
This commit is contained in:
@ -60,7 +60,7 @@ export const NameFields = ({
|
||||
if (autoSave) {
|
||||
await updateOneRecord({
|
||||
idToUpdate: currentWorkspaceMember?.id,
|
||||
input: {
|
||||
updateOneRecordInput: {
|
||||
name: {
|
||||
firstName: firstName,
|
||||
lastName: lastName,
|
||||
|
||||
@ -57,7 +57,7 @@ export const ProfilePictureUploader = () => {
|
||||
|
||||
await updateOneRecord({
|
||||
idToUpdate: currentWorkspaceMember?.id,
|
||||
input: {
|
||||
updateOneRecordInput: {
|
||||
avatarUrl,
|
||||
},
|
||||
});
|
||||
@ -84,7 +84,7 @@ export const ProfilePictureUploader = () => {
|
||||
|
||||
await updateOneRecord({
|
||||
idToUpdate: currentWorkspaceMember?.id,
|
||||
input: {
|
||||
updateOneRecordInput: {
|
||||
avatarUrl: null,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user