diff --git a/web/app.react.js b/web/app.react.js --- a/web/app.react.js +++ b/web/app.react.js @@ -32,6 +32,7 @@ import { infoFromURL } from 'lib/utils/url-utils.js'; import { WagmiENSCacheProvider, wagmiClient } from 'lib/utils/wagmi-utils.js'; +import WebEditThreadAvatarProvider from './avatars/native-edit-thread-avatar-provider.react.js'; import Calendar from './calendar/calendar.react.js'; import Chat from './chat/chat.react.js'; import { EditModalProvider } from './chat/edit-message-provider.js'; @@ -167,10 +168,12 @@ if (this.props.loggedIn) { content = ( <> - - {this.renderMainContent()} - {this.props.modals} - + + + {this.renderMainContent()} + {this.props.modals} + + ); } else { diff --git a/web/avatars/native-edit-thread-avatar-provider.react.js b/web/avatars/native-edit-thread-avatar-provider.react.js new file mode 100644 --- /dev/null +++ b/web/avatars/native-edit-thread-avatar-provider.react.js @@ -0,0 +1,25 @@ +// @flow + +import * as React from 'react'; + +import { BaseEditThreadAvatarProvider } from 'lib/components/base-edit-thread-avatar-provider.react.js'; + +import { useSelector } from '../redux/redux-utils.js'; +import { activeChatThreadItem as activeChatThreadItemSelector } from '../selectors/chat-selectors.js'; + +type Props = { + +children: React.Node, +}; +function WebEditThreadAvatarProvider(props: Props): React.Node { + const { children } = props; + const activeChatThreadItem = useSelector(activeChatThreadItemSelector); + const activeThreadID = activeChatThreadItem?.threadInfo?.id ?? ''; + + return ( + + {children} + + ); +} + +export default WebEditThreadAvatarProvider;