fix: Reduce payload in event-type/getByViewer (#13580)

* Avoid selecting unused props

* Reduce payload

---------

Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
Hariom BalharaandUdit Takkar authored and GitHub committed 2024-02-07 09:40:45 -03:00
1 parent 0e6f44e2b9
commit 34d360a4ec
6 files changed
+65 -18

No files matched your search

@@ -166,11 +166,7 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou
return readOnly ? (
<div className="flex-1 overflow-hidden pr-4 text-sm">
{content()}
<EventTypeDescription
// @ts-expect-error FIXME: We have a type mismatch here @hariombalhara @sean-brydon
eventType={type}
shortenDescription
/>
<EventTypeDescription eventType={type} shortenDescription />
</div>
) : (
<Link
@@ -197,7 +193,6 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou
)}
</div>
<EventTypeDescription
// @ts-expect-error FIXME: We have a type mismatch here @hariombalhara @sean-brydon
eventType={{ ...type, descriptionAsSafeHTML: type.safeDescription }}
shortenDescription
/>