Toast fixes/refactoring (#4289)

* Memoize Toast functions
* Rename Toast.success to Toast.toast, add new Toast.success
* Disable prefer-destructuring on AssignmentExpression
This commit is contained in:
DingDongSoLong4
2023-11-20 05:14:34 +02:00
committed by GitHub
parent 049a1b15c3
commit f9e11813f0
52 changed files with 336 additions and 387 deletions

View File

@@ -196,9 +196,7 @@ export const GalleryEditPanel: React.FC<IProps> = ({
try {
const result = await queryScrapeGallery(scraper.id, gallery.id);
if (!result.data || !result.data.scrapeSingleGallery?.length) {
Toast.success({
content: "No galleries found",
});
Toast.success("No galleries found");
return;
}
setScrapedGallery(result.data.scrapeSingleGallery[0]);