diff --git a/src/Components/Templates/AttestationForm.tsx b/src/Components/Templates/AttestationForm.tsx index a9b84086..ce5994ad 100644 --- a/src/Components/Templates/AttestationForm.tsx +++ b/src/Components/Templates/AttestationForm.tsx @@ -38,10 +38,12 @@ export const AttestationForm = ({ api }: { api?: ItemsApi }) => { setInputValue(event.target.value) } - const sendAttestation = async () => { + const sendAttestation = () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const to: any[] = [] users?.map((u) => to.push({ directus_users_id: u.user_created?.id })) + // eslint-disable-next-line @typescript-eslint/no-floating-promises api?.createItem && toast .promise( @@ -57,6 +59,7 @@ export const AttestationForm = ({ api }: { api?: ItemsApi }) => { success: 'Attestation created', error: { render({ data }) { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions return `${data}` }, }, @@ -65,8 +68,10 @@ export const AttestationForm = ({ api }: { api?: ItemsApi }) => { .then(() => navigate( '/item/' + + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands items.find( (i) => + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access i.user_created?.id === to[0].directus_users_id && i.layer?.itemType.name === 'player', )?.id + @@ -84,29 +89,28 @@ export const AttestationForm = ({ api }: { api?: ItemsApi }) => {
Gratitude
to
- {users && - users.map( - (u, k) => ( -
- {u.image ? ( -
-
- Avatar -
+ {users?.map( + (u, k) => ( +
+ {u.image ? ( +
+
+ Avatar
- ) : ( -
- )} -
-
{u.name}
+ ) : ( +
+ )} +
+
{u.name}
- ), - ', ', - )} +
+ ), + ', ', + )}