mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-20 20:07:03 -04:00
SpotifyControls: fix SeekBar not updating (#3381)
Also slightly reworks LazyComponents for more useful typing
This commit is contained in:
parent
a8c01a2a05
commit
0f4d3dfd3a
9 changed files with 57 additions and 27 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
import { Logger } from "@utils/Logger";
|
||||
import { Margins } from "@utils/margins";
|
||||
import { LazyComponent } from "@utils/react";
|
||||
import { LazyComponent, LazyComponentWrapper } from "@utils/react";
|
||||
import { React } from "@webpack/common";
|
||||
|
||||
import { ErrorCard } from "./ErrorCard";
|
||||
|
@ -107,9 +107,9 @@ const ErrorBoundary = LazyComponent(() => {
|
|||
}
|
||||
};
|
||||
}) as
|
||||
React.ComponentType<React.PropsWithChildren<Props>> & {
|
||||
LazyComponentWrapper<React.ComponentType<React.PropsWithChildren<Props>> & {
|
||||
wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): React.FunctionComponent<T>;
|
||||
};
|
||||
}>;
|
||||
|
||||
ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => (
|
||||
<ErrorBoundary {...errorBoundaryProps} wrappedProps={props}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue