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)
|
||||
}
|
||||
|
||||
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<unknown> }) => {
|
||||
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<unknown> }) => {
|
||||
.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<unknown> }) => {
|
||||
<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-flex tw-flex-row tw-justify-center tw-items-center tw-flex-wrap'>
|
||||
{users &&
|
||||
users.map(
|
||||
(u, k) => (
|
||||
<div key={k} className='tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1'>
|
||||
{u.image ? (
|
||||
<div className='tw-avatar'>
|
||||
<div className='tw-mask tw-mask-circle tw-w-8 tw-h-8'>
|
||||
<img
|
||||
src={appState.assetsApi.url + u.image + '?width=40&heigth=40'}
|
||||
alt='Avatar'
|
||||
/>
|
||||
</div>
|
||||
{users?.map(
|
||||
(u, k) => (
|
||||
<div key={k} className='tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1'>
|
||||
{u.image ? (
|
||||
<div className='tw-avatar'>
|
||||
<div className='tw-mask tw-mask-circle tw-w-8 tw-h-8'>
|
||||
<img
|
||||
src={appState.assetsApi.url + u.image + '?width=40&heigth=40'}
|
||||
alt='Avatar'
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className='tw-mask tw-mask-circle tw-text-xl md:tw-text-2xl tw-bg-slate-200 tw-rounded-full tw-w-8 tw-h-8'></div>
|
||||
)}
|
||||
<div>
|
||||
<div className='tw-font-bold'>{u.name}</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className='tw-mask tw-mask-circle tw-text-xl md:tw-text-2xl tw-bg-slate-200 tw-rounded-full tw-w-8 tw-h-8'></div>
|
||||
)}
|
||||
<div>
|
||||
<div className='tw-font-bold'>{u.name}</div>
|
||||
</div>
|
||||
),
|
||||
', ',
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
', ',
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className='tw-w-full'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user