mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-10 02:25:27 +00:00
Fix: Add default for font combo box.
Don't pass dispatcher in, just provide it globally. Fix: Allow clicking through to profile from server sidebar.
This commit is contained in:
@@ -8,16 +8,8 @@ import { connect, ConnectedComponent } from "react-redux";
|
||||
export function connectState<T>(
|
||||
component: (props: any) => h.JSX.Element | null,
|
||||
mapKeys: (state: State, props: T) => any,
|
||||
useDispatcher?: boolean,
|
||||
memoize?: boolean
|
||||
): ConnectedComponent<(props: any) => h.JSX.Element | null, T> {
|
||||
let c = (
|
||||
useDispatcher
|
||||
? connect(mapKeys, (dispatcher) => {
|
||||
return { dispatcher };
|
||||
})
|
||||
: connect(mapKeys)
|
||||
)(component);
|
||||
|
||||
let c = connect(mapKeys)(component);
|
||||
return memoize ? memo(c) : c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user