From 2e403e094d98e33c5ab158d23f0c1b0581e627dc Mon Sep 17 00:00:00 2001 From: antongotech <105588893+antongotech@users.noreply.github.com> Date: Mon, 16 Jan 2023 14:37:52 +0200 Subject: [PATCH 1/2] logo image fixed --- src/components/editLogoPopup/EditLogoPopup.tsx | 4 +++- src/hooks/useJettonLogo.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/editLogoPopup/EditLogoPopup.tsx b/src/components/editLogoPopup/EditLogoPopup.tsx index b284490..0e79b14 100644 --- a/src/components/editLogoPopup/EditLogoPopup.tsx +++ b/src/components/editLogoPopup/EditLogoPopup.tsx @@ -13,6 +13,7 @@ import { PopupTitle, } from "components/editLogoPopup/styled"; import { useJettonLogo } from "hooks/useJettonLogo"; +import QuestiomMarkImg from "assets/icons/question.png"; interface EditLogoPopupProps { showPopup: boolean; @@ -40,7 +41,7 @@ export const EditLogoPopup = ({ }; useEffect(() => { - setTempUrl(jettonLogo.logoUrl); + setTempUrl(jettonLogo.logoUrl === QuestiomMarkImg ? "" : jettonLogo.logoUrl); }, [showPopup]); return ( @@ -50,6 +51,7 @@ export const EditLogoPopup = ({ setInputFocus(true)} onBlur={() => setInputFocus(false)} diff --git a/src/hooks/useJettonLogo.tsx b/src/hooks/useJettonLogo.tsx index 0730faf..5e9717a 100644 --- a/src/hooks/useJettonLogo.tsx +++ b/src/hooks/useJettonLogo.tsx @@ -22,11 +22,12 @@ export const useJettonLogo = () => { const [jettonLogo, setJettonLogo] = useRecoilState(jettonLogoState); const { jettonImage } = useJettonStore(); const { jettonAddress } = useJettonAddress(); - const resetJetton = () => setJettonLogo(defaultState); const setLogoUrl = (val: string) => setJettonLogo((prev) => { + // console.log(isJettonImageEmpty) + // console.log(isJettonImageEmpty ? '' : val) return { ...prev, logoUrl: val, From b1feffc50860dacbaa3085ced17807ef729dccec Mon Sep 17 00:00:00 2001 From: antongotech <105588893+antongotech@users.noreply.github.com> Date: Mon, 16 Jan 2023 14:41:28 +0200 Subject: [PATCH 2/2] cleanup --- src/hooks/useJettonLogo.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hooks/useJettonLogo.tsx b/src/hooks/useJettonLogo.tsx index 5e9717a..ff6b7b9 100644 --- a/src/hooks/useJettonLogo.tsx +++ b/src/hooks/useJettonLogo.tsx @@ -26,8 +26,6 @@ export const useJettonLogo = () => { const setLogoUrl = (val: string) => setJettonLogo((prev) => { - // console.log(isJettonImageEmpty) - // console.log(isJettonImageEmpty ? '' : val) return { ...prev, logoUrl: val,