migrate components stickers to eslint

This commit is contained in:
Chris Svenningsen 2020-09-14 15:14:03 -07:00 committed by Josh Perez
parent 2ade4acd52
commit 5364de90a4
15 changed files with 225 additions and 203 deletions

View file

@ -19,7 +19,6 @@ export type OwnProps = {
export type Props = OwnProps;
export const StickerManager = React.memo(
// tslint:disable-next-line max-func-body-length
({
installedPacks,
receivedPacks,
@ -51,18 +50,17 @@ export const StickerManager = React.memo(
focusRef.current.focus();
}
});
// We only want to attempt downloads on initial load
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const clearPackToPreview = React.useCallback(() => {
setPackToPreview(null);
}, [setPackToPreview]);
const previewPack = React.useCallback(
(pack: StickerPackType) => {
setPackToPreview(pack);
},
[clearPackToPreview]
);
const previewPack = React.useCallback((pack: StickerPackType) => {
setPackToPreview(pack);
}, []);
return (
<>
@ -98,7 +96,7 @@ export const StickerManager = React.memo(
},
].map(section => {
if (section.hideIfEmpty && section.packs.length === 0) {
return;
return null;
}
return (