diff --git a/examples/channel/index.tsx b/examples/channel/index.tsx index 165c1524..335d3a87 100644 --- a/examples/channel/index.tsx +++ b/examples/channel/index.tsx @@ -1,12 +1,12 @@ import React, { StrictMode } from 'react' import { render } from 'react-dom' -import { GroupChat, lightTheme } from '@status-im/react' +import { Channel, lightTheme } from '@status-im/react' const App = () => { return (
- { return (
- message, [message]) const [elements, setElements] = useState<(string | React.ReactElement)[]>([ content, ]) const [link, setLink] = useState(undefined) - const [openGraph, setOpenGraph] = useState(undefined) + const [openGraph] = useState(undefined) useEffect(() => { let link @@ -95,21 +93,21 @@ export function ChatMessageContent({ setElements(newSplit) }, [content, setLink, setMentioned, setElements, setLinkOpen]) - useEffect(() => { - const updatePreview = async () => { - if (link && fetchMetadata) { - try { - const metadata = await fetchMetadata(link) - if (metadata) { - setOpenGraph(metadata) - } - } catch { - return - } - } - } - updatePreview() - }, [link, fetchMetadata]) + // useEffect(() => { + // const updatePreview = async () => { + // if (link && fetchMetadata) { + // try { + // const metadata = await fetchMetadata(link) + // if (metadata) { + // setOpenGraph(metadata) + // } + // } catch { + // return + // } + // } + // } + // updatePreview() + // }, [link, fetchMetadata]) return ( diff --git a/packages/status-react/src/components/Chat/ChatTopbar.tsx b/packages/status-react/src/components/Chat/ChatTopbar.tsx index 586fe563..3565c8c2 100644 --- a/packages/status-react/src/components/Chat/ChatTopbar.tsx +++ b/packages/status-react/src/components/Chat/ChatTopbar.tsx @@ -5,12 +5,12 @@ import styled from 'styled-components' import { useMessengerContext } from '../../contexts/messengerProvider' import { useNarrow } from '../../contexts/narrowProvider' import { useClickOutside } from '../../hooks/useClickOutside' +import { CommunitySidebar } from '../../modules/community/CommunitySidebar' import { ActivityButton, ActivityWrapper, } from '../ActivityCenter/ActivityButton' import { Channel } from '../Channels/Channel' -import { Community } from '../Community' import { ChannelMenu } from '../Form/ChannelMenu' import { ActivityIcon } from '../Icons/ActivityIcon' import { MembersIcon } from '../Icons/MembersIcon' @@ -85,7 +85,7 @@ export function ChatTopbar({ <> {narrow && ( - + )} diff --git a/packages/status-react/src/components/CommunityChat.tsx b/packages/status-react/src/components/CommunityChat.tsx deleted file mode 100644 index e1dd549b..00000000 --- a/packages/status-react/src/components/CommunityChat.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React, { useRef } from 'react' - -import styled, { ThemeProvider } from 'styled-components' - -import { ChatStateProvider } from '../contexts/chatStateProvider' -import { ConfigProvider } from '../contexts/configProvider' -import { FetchMetadataProvider } from '../contexts/fetchMetadataProvider' -import { IdentityProvider } from '../contexts/identityProvider' -import { MessengerProvider } from '../contexts/messengerProvider' -import { ModalProvider } from '../contexts/modalProvider' -import { NarrowProvider } from '../contexts/narrowProvider' -import { ScrollProvider } from '../contexts/scrollProvider' -import { ToastProvider } from '../contexts/toastProvider' -import { GlobalStyle } from '../styles/GlobalStyle' -import { CommunityChatRoom } from './CommunityChatRoom' - -import type { ConfigType } from '..' -import type { Metadata } from '../models/Metadata' -import type { Theme } from '../styles/themes' - -interface CommunityChatProps { - theme: Theme - communityKey: string - config: ConfigType - fetchMetadata?: (url: string) => Promise -} - -export function CommunityChat({ - theme, - config, - fetchMetadata, - communityKey, -}: CommunityChatProps) { - const ref = useRef(null) - return ( - - - - - - - - - - - - - -