[skip ci] add react linting

This commit is contained in:
Vendicated 2023-10-31 23:43:28 +01:00
parent 522fdcd15d
commit 18fdc33ee7
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
37 changed files with 884 additions and 97 deletions

View file

@ -205,7 +205,7 @@ function CloneModal({ data }: { data: Sticker | Emoji; }) {
alignItems: "center"
}}>
{guilds.map(g => (
<Tooltip text={g.name}>
<Tooltip key={g.id} text={g.name}>
{({ onMouseLeave, onMouseEnter }) => (
<div
onMouseLeave={onMouseLeave}
@ -278,25 +278,27 @@ function buildMenuItem(type: "Emoji" | "Sticker", fetchData: () => Promisable<Om
const data = { t: type, ...res } as Sticker | Emoji;
const url = getUrl(data);
return modalProps => (
<ModalRoot {...modalProps}>
<ModalHeader>
<img
role="presentation"
aria-hidden
src={url}
alt=""
height={24}
width={24}
style={{ marginRight: "0.5em" }}
/>
<Forms.FormText>Clone {data.name}</Forms.FormText>
</ModalHeader>
<ModalContent>
<CloneModal data={data} />
</ModalContent>
</ModalRoot>
);
return function EmoteClonerModal(modalProps) {
return (
<ModalRoot {...modalProps}>
<ModalHeader>
<img
role="presentation"
aria-hidden
src={url}
alt=""
height={24}
width={24}
style={{ marginRight: "0.5em" }}
/>
<Forms.FormText>Clone {data.name}</Forms.FormText>
</ModalHeader>
<ModalContent>
<CloneModal data={data} />
</ModalContent>
</ModalRoot>
);
};
})
}
/>