mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 10:57:04 -04:00
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:
parent
6114bc6b16
commit
1d995e58f5
25 changed files with 533 additions and 106 deletions
|
@ -19,7 +19,7 @@
|
|||
import { LazyComponent } from "@utils/misc";
|
||||
|
||||
// eslint-disable-next-line path-alias/no-relative
|
||||
import { FilterFn, waitFor } from "../webpack";
|
||||
import { FilterFn, filters, waitFor } from "../webpack";
|
||||
|
||||
export function waitForComponent<T extends React.ComponentType<any> = React.ComponentType<any> & Record<string, any>>(name: string, filter: FilterFn | string | string[]): T {
|
||||
let myValue: T = function () {
|
||||
|
@ -34,3 +34,7 @@ export function waitForComponent<T extends React.ComponentType<any> = React.Comp
|
|||
|
||||
return lazyComponent;
|
||||
}
|
||||
|
||||
export function waitForStore(name: string, cb: (v: any) => void) {
|
||||
waitFor(filters.byStoreName(name), cb);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue