fix: cover image update fix for project and user profile (#6075)
* fix: cover image update payload * fix: cover image assets * chore: add gif support --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
parent
6f497b024b
commit
d5a55de17a
6 changed files with 61 additions and 11 deletions
|
|
@ -70,11 +70,15 @@ const ProfileSettingsPage = observer(() => {
|
|||
first_name: formData.first_name,
|
||||
last_name: formData.last_name,
|
||||
avatar_url: formData.avatar_url,
|
||||
cover_image_url: formData.cover_image_url,
|
||||
role: formData.role,
|
||||
display_name: formData?.display_name,
|
||||
user_timezone: formData.user_timezone,
|
||||
};
|
||||
// if unsplash or a pre-defined image is uploaded, delete the old uploaded asset
|
||||
if (formData.cover_image_url?.startsWith("http")) {
|
||||
payload.cover_image = formData.cover_image_url;
|
||||
payload.cover_image_asset = null;
|
||||
}
|
||||
|
||||
const updateCurrentUserDetail = updateCurrentUser(payload).finally(() => setIsLoading(false));
|
||||
setPromiseToast(updateCurrentUserDetail, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue