Notification API (#467)

Co-authored-by: Ven <vendicated@riseup.net>
Co-authored-by: afn <hey@afn.lol>
Co-authored-by: afn <afnzmn@gmail.com>
This commit is contained in:
Ven 2023-02-10 22:33:34 +01:00 committed by GitHub
parent 6114bc6b16
commit 1d995e58f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 533 additions and 106 deletions

View file

@ -23,8 +23,8 @@ import { Flex } from "@components/Flex";
import { Link } from "@components/Link";
import { debounce } from "@utils/debounce";
import { classes, LazyComponent } from "@utils/misc";
import { filters, find, findByCodeLazy } from "@webpack";
import { ContextMenu, FluxDispatcher, Forms, Menu, React, useEffect, useState } from "@webpack/common";
import { filters, find } from "@webpack";
import { ContextMenu, FluxDispatcher, Forms, Menu, React, useEffect, useState, useStateFromStores } from "@webpack/common";
import { SpotifyStore, Track } from "./SpotifyStore";
@ -37,14 +37,6 @@ function msToHuman(ms: number) {
return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
}
const useStateFromStores: <T>(
stores: typeof SpotifyStore[],
mapper: () => T,
idk?: null,
compare?: (old: T, newer: T) => boolean
) => T
= findByCodeLazy("useStateFromStores");
function Svg(path: string, label: string) {
return () => (
<svg