mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Solve linting errors or outcomment rules
This commit is contained in:
parent
0c60f9fc7f
commit
6287bb78e8
@ -38,10 +38,12 @@ export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
|||||||
setInputValue(event.target.value)
|
setInputValue(event.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendAttestation = async () => {
|
const sendAttestation = () => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const to: any[] = []
|
const to: any[] = []
|
||||||
users?.map((u) => to.push({ directus_users_id: u.user_created?.id }))
|
users?.map((u) => to.push({ directus_users_id: u.user_created?.id }))
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
api?.createItem &&
|
api?.createItem &&
|
||||||
toast
|
toast
|
||||||
.promise(
|
.promise(
|
||||||
@ -57,6 +59,7 @@ export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
|||||||
success: 'Attestation created',
|
success: 'Attestation created',
|
||||||
error: {
|
error: {
|
||||||
render({ data }) {
|
render({ data }) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
return `${data}`
|
return `${data}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -65,8 +68,10 @@ export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
|||||||
.then(() =>
|
.then(() =>
|
||||||
navigate(
|
navigate(
|
||||||
'/item/' +
|
'/item/' +
|
||||||
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||||
items.find(
|
items.find(
|
||||||
(i) =>
|
(i) =>
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||||
i.user_created?.id === to[0].directus_users_id &&
|
i.user_created?.id === to[0].directus_users_id &&
|
||||||
i.layer?.itemType.name === 'player',
|
i.layer?.itemType.name === 'player',
|
||||||
)?.id +
|
)?.id +
|
||||||
@ -84,8 +89,7 @@ export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
|||||||
<div className='tw-text-center tw-text-xl tw-font-bold'>Gratitude</div>
|
<div className='tw-text-center tw-text-xl tw-font-bold'>Gratitude</div>
|
||||||
<div className='tw-text-center tw-text-base tw-text-gray-400'>to</div>
|
<div className='tw-text-center tw-text-base tw-text-gray-400'>to</div>
|
||||||
<div className='tw-flex tw-flex-row tw-justify-center tw-items-center tw-flex-wrap'>
|
<div className='tw-flex tw-flex-row tw-justify-center tw-items-center tw-flex-wrap'>
|
||||||
{users &&
|
{users?.map(
|
||||||
users.map(
|
|
||||||
(u, k) => (
|
(u, k) => (
|
||||||
<div key={k} className='tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1'>
|
<div key={k} className='tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1'>
|
||||||
{u.image ? (
|
{u.image ? (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user