Skip to content

Commit

Permalink
perf(admin): update user avatar preRenderTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Aug 20, 2023
1 parent 49678f3 commit 0058880
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/admin/src/client/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const userFields = [
}),
createBooleanField('temporary'),
createAvatarField('avatar', {
preRenderTransform: parseUrlStr,
preRenderTransform: (val) =>
typeof val === 'string' ? parseUrlStr(val) : val,
}),
createTextField('type', {
edit: {
Expand Down Expand Up @@ -161,7 +162,13 @@ export const fileFields = [
}),
createTextField('metaData.content-type'),
createTextField('etag'),
createTextField('userId'),
createUserField('userId', {
reference: 'users',
displayField: 'nickname',
list: {
width: 80,
},
}),
createDateTimeField('createdAt'),
];

Expand Down

0 comments on commit 0058880

Please sign in to comment.