3804 use email visibility to display only the shared information frontend (#3875)

* create and use component

* visibility working

* Fix click behavior for email thread previews

* Add dynamic styling to EmailThreadPreview component

* refactor to respect the convention
This commit is contained in:
bosiraphael
2024-02-08 17:49:29 +01:00
committed by GitHub
parent 99e2dd6899
commit 2ba9a209e8
4 changed files with 62 additions and 6 deletions

View File

@ -185,7 +185,18 @@ export const EmailThreads = ({
key={index}
divider={index < timelineThreads.length - 1}
thread={thread}
onClick={() => openEmailThread(thread.id)}
onClick={
thread.visibility === 'share_everything'
? () => openEmailThread(thread.id)
: () => {}
}
visibility={
// TODO: Fix typing for visibility
thread.visibility as
| 'metadata'
| 'subject'
| 'share_everything'
}
/>
))}
</Card>