mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 14:43:03 -04:00
SpotifyControls plugin (#190)
This commit is contained in:
parent
7d5ade21fc
commit
6a8564089b
9 changed files with 852 additions and 64 deletions
|
@ -74,9 +74,9 @@ export function useAwaiter<T>(factory: () => Promise<T>, fallbackValue: T | null
|
|||
* @param factory Function returning a Component
|
||||
* @returns Result of factory function
|
||||
*/
|
||||
export function LazyComponent<T extends JSX.IntrinsicAttributes = any>(factory: () => React.ComponentType<T>) {
|
||||
export function LazyComponent<T = any>(factory: () => React.ComponentType<T>) {
|
||||
const get = makeLazy(factory);
|
||||
return (props: T) => {
|
||||
return (props: T & JSX.IntrinsicAttributes) => {
|
||||
const Component = get();
|
||||
return <Component {...props} />;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue