-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix attachment issue #2976
Fix attachment issue #2976
Conversation
98f19cd
to
f1042e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix all type issues.
const handleAttachmentClick = useCallback((attachment: LeadPreviewAttachmentType) => { | ||
if (onEntryCreate) { | ||
onEntryCreate({ | ||
clientId: randomString(), | ||
entryType: 'ATTACHMENT', | ||
lead: leadId, | ||
leadAttachment: attachment.id, | ||
excerpt: '', | ||
droppedExcerpt: '', | ||
}); | ||
setLeadAttachmentsMap((oldValue) => ({ | ||
...oldValue, | ||
[attachment.id]: attachment, | ||
})); | ||
} | ||
}, [leadId, onEntryCreate]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're handling this in 'EntryEdit' and not here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@subinasr By adding handleAttachmentClick to the LeftPane Entries, the leadId is utilized in both the secondary and review tabs. Moving it to entryEdit makes the leadId accessible across all tabs, which explains why the image was only visible in the primary tab previously.
02909af
to
0e7e4ba
Compare
0e7e4ba
to
e7a55c1
Compare
Changes
This PR doesn't introduce any:
console.log
meant for debuggingThis PR contains valid: