From a6e4c70589f71aad868fff8477bbff57f736ca93 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Thu, 13 Feb 2025 17:04:45 +0530 Subject: [PATCH 1/2] fix: project cover image --- web/core/components/project/card.tsx | 1 + web/core/components/project/form.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/core/components/project/card.tsx b/web/core/components/project/card.tsx index 304ecab3351..dadaf417587 100644 --- a/web/core/components/project/card.tsx +++ b/web/core/components/project/card.tsx @@ -206,6 +206,7 @@ export const ProjectCard: React.FC = observer((props) => { {project.name} = (props) => { }); // derived values const currentNetwork = NETWORK_CHOICES.find((n) => n.key === project?.network); - const coverImage = watch("cover_image_url"); + const coverImageURL = watch("cover_image_url"); + const coverImage = watch("cover_image"); useEffect(() => { if (project && projectId !== getValues("id")) { @@ -160,7 +161,11 @@ export const ProjectDetailsForm: FC = (props) => {
Project cover image From 63b5dd686996492d89685cd54d23722c00cc197c Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Thu, 13 Feb 2025 20:20:23 +0530 Subject: [PATCH 2/2] chore: code refactor --- web/core/components/project/card.tsx | 1 - web/core/components/project/form.tsx | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/web/core/components/project/card.tsx b/web/core/components/project/card.tsx index dadaf417587..304ecab3351 100644 --- a/web/core/components/project/card.tsx +++ b/web/core/components/project/card.tsx @@ -206,7 +206,6 @@ export const ProjectCard: React.FC = observer((props) => { {project.name} = (props) => { }); // derived values const currentNetwork = NETWORK_CHOICES.find((n) => n.key === project?.network); - const coverImageURL = watch("cover_image_url"); - const coverImage = watch("cover_image"); + const coverImage = watch("cover_image_url"); useEffect(() => { if (project && projectId !== getValues("id")) { @@ -162,8 +161,7 @@ export const ProjectDetailsForm: FC = (props) => {