From c6bf77b99dea1de2db287f0e1ddd3cb9864291af Mon Sep 17 00:00:00 2001 From: harshrajat Date: Sun, 19 Mar 2023 17:01:01 +0400 Subject: [PATCH 1/3] partial commit --- package.json | 2 +- public/index.html | 22 ++++---- .../chat/w2wChat/chatBox/ChatBox.tsx | 56 +++++++++++-------- .../chat/w2wChat/messageFeed/MessageFeed.tsx | 12 ++-- .../chat/w2wChat/searchBar/SearchBar.tsx | 38 +++++++++---- src/modules/chat/ChatModule.tsx | 51 ++++++++++++----- src/pages/ChatPage.tsx | 5 +- src/sections/chat/ChatSidebarSection.tsx | 24 ++++---- src/structure/MasterInterfacePage.tsx | 16 +++--- src/types/chat.ts | 18 +++++- yarn.lock | 32 +++++------ 11 files changed, 171 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index adec0c2c31..8974776168 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "react-player": "2.9.0", "react-query": "^3.39.1", "react-redux": "^7.2.6", - "react-router-dom": "6", + "react-router-dom": "^6.9.0", "react-scripts": "^5.0.1", "react-scroll-to-bottom": "^4.2.0", "react-select": "^5.2.2", diff --git a/public/index.html b/public/index.html index b2ca23b5e5..18636ef7ec 100644 --- a/public/index.html +++ b/public/index.html @@ -28,23 +28,23 @@ Learn how to configure a non-root public URL by running `npm run build`. --> - Push Dev App (Previously EPNS) | Communication Protocol of Web3 - + Push App (Previously EPNS) | Communication Protocol of Web3 + - + - - - + + + - - - - - + + + + + diff --git a/src/components/chat/w2wChat/chatBox/ChatBox.tsx b/src/components/chat/w2wChat/chatBox/ChatBox.tsx index 11e26da36b..38ebe738b6 100644 --- a/src/components/chat/w2wChat/chatBox/ChatBox.tsx +++ b/src/components/chat/w2wChat/chatBox/ChatBox.tsx @@ -6,56 +6,56 @@ import React, { useContext, useEffect, useState } from 'react'; // External Packages import MuiAlert, { AlertProps } from '@mui/material/Alert'; import Snackbar from '@mui/material/Snackbar'; +import * as PushAPI from '@pushprotocol/restapi'; import 'font-awesome/css/font-awesome.min.css'; import { CID } from 'ipfs-http-client'; +import { BsDashLg } from 'react-icons/bs'; import { MdCheckCircle, MdError, MdOutlineArrowBackIos } from 'react-icons/md'; import { useQuery } from 'react-query'; import ScrollToBottom from 'react-scroll-to-bottom'; -import styled, { useTheme } from 'styled-components'; -import { BsDashLg } from 'react-icons/bs'; import { useClickAway } from 'react-use'; -import * as PushAPI from '@pushprotocol/restapi'; +import styled, { useTheme } from 'styled-components'; // Internal Components import * as PushNodeClient from 'api'; +import { ReactComponent as Info } from 'assets/chat/group-chat/info.svg'; +import { ReactComponent as InfoDark } from 'assets/chat/group-chat/infodark.svg'; +import { ReactComponent as More } from 'assets/chat/group-chat/more.svg'; +import { ReactComponent as MoreDark } from 'assets/chat/group-chat/moredark.svg'; import LoaderSpinner, { LOADER_SPINNER_TYPE, LOADER_TYPE } from 'components/reusables/loaders/LoaderSpinner'; import { ButtonV2, ImageV2, ItemHV2, ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2'; import { Content } from 'components/SharedStyling'; +import { ChatUserContext } from 'contexts/ChatUserContext'; import * as w2wHelper from 'helpers/w2w/'; -import useToast from 'hooks/useToast'; -import { useResolveEns } from 'hooks/useResolveEns'; -import { useDeviceWidthCheck } from 'hooks'; -import { Context } from 'modules/chat/ChatModule'; -import HandwaveIcon from '../../../../assets/chat/handwave.svg'; -import { caip10ToWallet, walletToCAIP10 } from '../../../../helpers/w2w'; -import Chats from '../chats/Chats'; -import { intitializeDb } from '../w2wIndexeddb'; -import Lock from '../../../../assets/Lock.png'; -import LockSlash from '../../../../assets/LockSlash.png'; -import { AppContext, Feeds, MessageIPFS, MessageIPFSWithCID, User } from 'types/chat'; -import videoCallIcon from '../../../../assets/icons/videoCallIcon.svg'; -import { ReactComponent as Info } from 'assets/chat/group-chat/info.svg'; -import { ReactComponent as More } from 'assets/chat/group-chat/more.svg'; -import { ReactComponent as InfoDark } from 'assets/chat/group-chat/infodark.svg'; -import { ReactComponent as MoreDark } from 'assets/chat/group-chat/moredark.svg'; import { checkConnectedUser, checkIfIntentExist, fetchInbox, getLatestThreadHash, - getUserWithDecryptedPvtKey, + getUserWithDecryptedPvtKey } from 'helpers/w2w/user'; -import Typebar from '../TypeBar/Typebar'; -import { ChatUserContext } from 'contexts/ChatUserContext'; -import { MessagetypeType } from '../../../../types/chat'; +import { useDeviceWidthCheck } from 'hooks'; +import { useResolveEns } from 'hooks/useResolveEns'; +import useToast from 'hooks/useToast'; +import { Context } from 'modules/chat/ChatModule'; +import { AppContext, Feeds, MessageIPFS, MessageIPFSWithCID, User } from 'types/chat'; +import HandwaveIcon from '../../../../assets/chat/handwave.svg'; +import videoCallIcon from '../../../../assets/icons/videoCallIcon.svg'; +import Lock from '../../../../assets/Lock.png'; +import LockSlash from '../../../../assets/LockSlash.png'; +import { caip10ToWallet, walletToCAIP10 } from '../../../../helpers/w2w'; import { checkIfGroup, getGroupImage, getIntentMessage, getMemberDetails } from '../../../../helpers/w2w/groupChat'; +import { MessagetypeType } from '../../../../types/chat'; +import Chats from '../chats/Chats'; +import Typebar from '../TypeBar/Typebar'; +import { intitializeDb } from '../w2wIndexeddb'; import { HeaderMessage } from './HeaderMessage'; // Internal Configs +import Tooltip from 'components/reusables/tooltip/Tooltip'; import { appConfig } from 'config'; import GLOBALS, { device } from 'config/Globals'; import { Item } from 'primaries/SharedStyling'; -import Tooltip from 'components/reusables/tooltip/Tooltip'; // Constants const INFURA_URL = appConfig.infuraApiUrl; @@ -85,6 +85,8 @@ const ChatBox = ({ setVideoCallInfo, showGroupInfoModal }): JSX.Element => { setReceivedIntents, setBlockedLoading, }: AppContext = useContext(Context); + const [chatMeta, setChatMeta] = useState(null); + const [newMessage, setNewMessage] = useState(''); const { chainId, account } = useWeb3React(); const [Loading, setLoading] = useState(true); @@ -210,6 +212,12 @@ const ChatBox = ({ setVideoCallInfo, showGroupInfoModal }): JSX.Element => { useEffect(() => { setLoading(true); + + // check if current chat has meta or not + // if (currentChat === 'string') { + + // } + if (currentChat) { setIsGroup(checkIfGroup(currentChat)); // We only delete the messages once the user clicks on another chat. The user could click multiple times on the same chat and it would delete the previous messages diff --git a/src/components/chat/w2wChat/messageFeed/MessageFeed.tsx b/src/components/chat/w2wChat/messageFeed/MessageFeed.tsx index 8b1cc43ae4..65619e5aaf 100644 --- a/src/components/chat/w2wChat/messageFeed/MessageFeed.tsx +++ b/src/components/chat/w2wChat/messageFeed/MessageFeed.tsx @@ -2,26 +2,26 @@ import React, { useContext, useEffect, useState } from 'react'; // External Packages +import { ethers } from 'ethers'; +import { MdError } from 'react-icons/md'; import { useQuery } from 'react-query'; import styled, { useTheme } from 'styled-components'; -import { MdError } from 'react-icons/md'; -import { ethers } from 'ethers'; // Internal Components import { useWeb3React } from '@web3-react/core'; -import { AppContext, Feeds, User } from 'types/chat'; import ChatSnap from 'components/chat/chatsnap/ChatSnap'; import LoaderSpinner, { LOADER_TYPE } from 'components/reusables/loaders/LoaderSpinner'; import { ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2'; +import { ChatUserContext } from 'contexts/ChatUserContext'; import { decryptFeeds, walletToCAIP10 } from 'helpers/w2w'; -import useToast from 'hooks/useToast'; import { checkConnectedUser, fetchInbox } from 'helpers/w2w/user'; +import useToast from 'hooks/useToast'; import { Context } from 'modules/chat/ChatModule'; -import { intitializeDb } from '../w2wIndexeddb'; -import { ChatUserContext } from 'contexts/ChatUserContext'; +import { AppContext, Feeds, User } from 'types/chat'; import { checkIfGroup, getChatsnapMessage, getGroupImage, getName } from '../../../../helpers/w2w/groupChat'; import { getDefaultFeed } from '../../../../helpers/w2w/user'; +import { intitializeDb } from '../w2wIndexeddb'; // Internal Configs diff --git a/src/components/chat/w2wChat/searchBar/SearchBar.tsx b/src/components/chat/w2wChat/searchBar/SearchBar.tsx index 57c3105086..b5bedf031e 100644 --- a/src/components/chat/w2wChat/searchBar/SearchBar.tsx +++ b/src/components/chat/w2wChat/searchBar/SearchBar.tsx @@ -1,8 +1,8 @@ // React + Web3 Essentials +import { Web3Provider } from '@ethersproject/providers'; import { useWeb3React } from '@web3-react/core'; import { ethers } from 'ethers'; -import { Web3Provider } from '@ethersproject/providers'; -import React, { useContext, useEffect, useState } from 'react'; +import React, { useContext, useEffect, useRef, useState } from 'react'; // External Packages import CloseIcon from '@material-ui/icons/Close'; @@ -13,19 +13,19 @@ import styled, { useTheme } from 'styled-components'; // Internal Components import * as PushNodeClient from 'api'; import { ReactComponent as SearchIcon } from 'assets/chat/search.svg'; -import ArrowLeft from '../../../../assets/chat/arrowleft.svg'; import LoaderSpinner, { LOADER_TYPE } from 'components/reusables/loaders/LoaderSpinner'; import { ButtonV2, ImageV2, ItemHV2, ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2'; -import useToast from 'hooks/useToast'; -import * as w2wChatHelper from 'helpers/w2w'; -import { Context } from 'modules/chat/ChatModule'; -import MessageFeed from '../messageFeed/MessageFeed'; -import { AppContext, User } from 'types/chat'; import { appConfig } from 'config'; import { findObject } from 'helpers/UtilityHelper'; +import * as w2wChatHelper from 'helpers/w2w'; import { displayDefaultUser } from 'helpers/w2w/user'; +import useToast from 'hooks/useToast'; +import { Context } from 'modules/chat/ChatModule'; +import { AppContext, User } from 'types/chat'; +import ArrowLeft from '../../../../assets/chat/arrowleft.svg'; +import MessageFeed from '../messageFeed/MessageFeed'; -const SearchBar = () => { +const SearchBar = ({ prefilled }) => { // get theme const theme = useTheme(); @@ -47,7 +47,8 @@ const SearchBar = () => { const [isLoadingSearch, setIsLoadingSearch] = useState(false); const provider = new ethers.providers.InfuraProvider(appConfig.coreContractChain, appConfig.infuraAPIKey); const searchFeedToast = useToast(); - + console.log("Search:", prefilled); + useEffect(() => { if (searchedUser !== '' && userShouldBeSearched) { handleSearch(); @@ -56,6 +57,23 @@ const SearchBar = () => { return () => setUserShouldBeSearched(false); }, []); + useEffect(() => { + if (prefilled && !userShouldBeSearched) { + // automate search + setSearchedUser(prefilled); + } + + }, [userShouldBeSearched, prefilled]); + + useEffect(() => { + if (searchedUser) { + const event = new KeyboardEvent('keypress', { + key: 'enter', + }); + submitSearch(event); + } + }, [searchedUser]); + useEffect(() => { if (isInValidAddress) { searchFeedToast.showMessageToast({ diff --git a/src/modules/chat/ChatModule.tsx b/src/modules/chat/ChatModule.tsx index dff09d2c90..20de6199d5 100644 --- a/src/modules/chat/ChatModule.tsx +++ b/src/modules/chat/ChatModule.tsx @@ -1,42 +1,43 @@ // React + Web3 Essentials -import React, { useContext, useEffect, useState } from 'react'; import { useWeb3React } from '@web3-react/core'; import { ethers } from 'ethers'; +import React, { useContext, useEffect, useState } from 'react'; +import { useNavigate } from "react-router-dom"; // External Packages import ReactGA from 'react-ga'; -import styled, { useTheme } from 'styled-components'; import { QueryClient, QueryClientProvider } from 'react-query'; import { ReactQueryDevtools } from 'react-query/devtools'; import { ToastOptions } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; +import styled, { useTheme } from 'styled-components'; // Internal Compoonents -import { AppContext, Feeds, User } from 'types/chat'; -import { ItemHV2, ItemVV2 } from 'components/reusables/SharedStylingV2'; +import { CreateGroupModalContent } from 'components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent'; +import { GroupInfoModalContent } from 'components/chat/w2wChat/groupChat/groupInfo/groupInfoModalContent'; import LoaderSpinner, { LOADER_OVERLAY, LOADER_SPINNER_TYPE, LOADER_TYPE, - PROGRESS_POSITIONING, + PROGRESS_POSITIONING } from 'components/reusables/loaders/LoaderSpinner'; +import { ItemHV2, ItemVV2 } from 'components/reusables/SharedStylingV2'; import { VideoCallContext } from 'contexts/VideoCallContext'; +import useModalBlur from 'hooks/useModalBlur'; +import useToast from 'hooks/useToast'; import ChatBoxSection from 'sections/chat/ChatBoxSection'; import ChatSidebarSection from 'sections/chat/ChatSidebarSection'; import VideoCallSection, { VideoCallInfoI } from 'sections/video/VideoCallSection'; -import useToast from 'hooks/useToast'; -import { GroupInfoModalContent } from 'components/chat/w2wChat/groupChat/groupInfo/groupInfoModalContent'; -import useModalBlur from 'hooks/useModalBlur'; -import { CreateGroupModalContent } from 'components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent'; +import { AppContext, Feeds, User } from 'types/chat'; // Internal Configs -import GLOBALS, { device, globalsMargin } from 'config/Globals'; -import { ChatUserContext } from 'contexts/ChatUserContext'; import ChatQR from 'components/chat/w2wChat/chatQR/chatQR'; -import { useClickAway } from 'react-use'; -import { useDeviceWidthCheck } from 'hooks'; import MobileView from 'components/chat/w2wChat/chatQR/mobileView'; +import GLOBALS, { device, globalsMargin } from 'config/Globals'; +import { ChatUserContext } from 'contexts/ChatUserContext'; import { checkIfGroup, rearrangeMembers } from 'helpers/w2w/groupChat'; +import { useDeviceWidthCheck } from 'hooks'; +import { useClickAway } from 'react-use'; export const ToastPosition: ToastOptions = { position: 'top-right', @@ -51,7 +52,7 @@ export const ToastPosition: ToastOptions = { export const Context = React.createContext(null); // Create Header -function Chat() { +function Chat({ chatid }) { const { account, chainId, library } = useWeb3React(); const { getUser, connectedUser, setConnectedUser, blockedLoading, setBlockedLoading, displayQR, setDisplayQR } = @@ -180,6 +181,11 @@ function Chat() { }); setIsLoading(false); + + if (chatid) { + // dynamic url + setCurrentTab(3); + } }; const setActiveTab = (tab: number): void => { @@ -195,16 +201,31 @@ function Chat() { } }; + let navigate = useNavigate(); const setChat = (feed: Feeds): void => { + if (feed) { setViewChatBox(true); if(checkIfGroup(feed)) { rearrangeMembers(feed,connectedUser); } + + // check and set to wallet or chat id + let chatid = feed.did; + if (!chatid) { + // check group information + if (feed.groupInformation) { + chatid = feed.groupInformation.chatId; + } + } setCurrentChat(feed); + + // lastly, set navigation for dynamic linking + navigate(`/chat/${chatid}`); } else { setViewChatBox(false); + navigate(`/chat`); } }; @@ -248,7 +269,7 @@ function Chat() { background={theme.default.bg} chatActive={viewChatBox} > - + { + let { chatid } = useParams(); + // RENDER return ( - + ); } diff --git a/src/sections/chat/ChatSidebarSection.tsx b/src/sections/chat/ChatSidebarSection.tsx index 8619c90160..90e57b78d1 100644 --- a/src/sections/chat/ChatSidebarSection.tsx +++ b/src/sections/chat/ChatSidebarSection.tsx @@ -9,28 +9,28 @@ import { useClickAway } from 'react-use'; import styled, { useTheme } from 'styled-components'; // Internal Compoonents -import IntentFeed from 'components/chat/w2wChat/intentFeed/IntentFeed'; import * as PushAPI from "@pushprotocol/restapi"; +import { ReactComponent as CreateGroupIcon } from 'assets/chat/group-chat/creategroup.svg'; +import { ReactComponent as CreateGroupFillIcon } from 'assets/chat/group-chat/creategroupfill.svg'; +import IntentFeed from 'components/chat/w2wChat/intentFeed/IntentFeed'; +import MessageFeed from 'components/chat/w2wChat/messageFeed/MessageFeed'; import ProfileHeader from 'components/chat/w2wChat/profile'; import SearchBar from 'components/chat/w2wChat/searchBar/SearchBar'; -import { checkConnectedUser } from 'helpers/w2w/user'; -import { Feeds } from 'types/chat'; import { intitializeDb } from 'components/chat/w2wChat/w2wIndexeddb'; import { ButtonV2, ItemHV2, ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2'; +import { ChatUserContext } from 'contexts/ChatUserContext'; +import StyleHelper from 'helpers/StyleHelper'; import * as w2wHelper from 'helpers/w2w/'; -import StyleHelper from 'helpers/StyleHelper'; -import MessageFeed from 'components/chat/w2wChat/messageFeed/MessageFeed'; +import { checkConnectedUser } from 'helpers/w2w/user'; import { Context } from 'modules/chat/ChatModule'; -import { ChatUserContext } from 'contexts/ChatUserContext'; -import { ReactComponent as CreateGroupIcon } from 'assets/chat/group-chat/creategroup.svg'; -import { ReactComponent as CreateGroupFillIcon } from 'assets/chat/group-chat/creategroupfill.svg'; +import { Feeds } from 'types/chat'; // Internal Configs +import NewTag from 'components/NewTag'; import GLOBALS from 'config/Globals'; -import { appConfig } from '../../config'; import { getIsNewTagVisible } from 'helpers/TimerHelper'; -import NewTag from 'components/NewTag'; +import { appConfig } from '../../config'; @@ -61,7 +61,7 @@ const createGroupOnMouseLeave = [{ // Chat Sections // Divided into two, left and right -const ChatSidebarSection = ({showCreateGroupModal}) => { +const ChatSidebarSection = ({ showCreateGroupModal, prefilledSearch }) => { // theme context const theme = useTheme(); @@ -263,7 +263,7 @@ useClickAway(containerRef, () => closeQRDropdown()) )} - {activeTab == 3 && } + {activeTab == 3 && } {/* Footer */} diff --git a/src/structure/MasterInterfacePage.tsx b/src/structure/MasterInterfacePage.tsx index cbc148c2d5..cab02cec1d 100644 --- a/src/structure/MasterInterfacePage.tsx +++ b/src/structure/MasterInterfacePage.tsx @@ -2,14 +2,13 @@ import React, { useState } from 'react'; // External Packages -import { Navigate, Route, Routes, useLocation } from 'react-router-dom'; -import styled from 'styled-components'; +import { VscClose } from 'react-icons/vsc'; +import { Navigate, Route, Routes, useLocation, useParams } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.min.css'; -import { VscClose } from 'react-icons/vsc'; +import styled from 'styled-components'; // Internal Components -import { Anchor, Item } from '../primaries/SharedStyling'; import AirdropPage from 'pages/AirdropPage'; import ChannelDashboardPage from 'pages/ChannelDashboardPage'; import ChannelsPage from 'pages/ChannelsPage'; @@ -27,16 +26,16 @@ import SpamPage from 'pages/SpamPage'; import SupportPage from 'pages/SupportPage'; import TutorialPage from 'pages/TutorialPage'; import YieldFarmingPage from 'pages/YieldFarmingPage'; +import { Anchor, Item } from '../primaries/SharedStyling'; // Internal Configs -import GLOBALS from 'config/Globals'; import { useWeb3React } from '@web3-react/core'; +import * as PushNodeClient from 'api'; +import GLOBALS from 'config/Globals'; import { ethers } from 'ethers'; import CryptoHelper from 'helpers/CryptoHelper'; -import * as PushNodeClient from 'api'; import * as w2wHelper from 'helpers/w2w'; -import { User } from 'types/chat'; -import { ConnectedUser, Feeds } from 'types/chat'; +import { ConnectedUser, Feeds, User } from 'types/chat'; // Create Header function MasterInterfacePage() { @@ -51,6 +50,7 @@ function MasterInterfacePage() { } /> + } /> } /> {/* } /> */} diff --git a/src/types/chat.ts b/src/types/chat.ts index fc58624fce..c4bd0a4e10 100644 --- a/src/types/chat.ts +++ b/src/types/chat.ts @@ -57,7 +57,23 @@ export interface IGroup { groupDescription: string | null, groupCreator: string, chatId: string - } +} + +export interface ChatMetaI { + did: string; + wallets: string; + profilePicture: string | null; + publicKey: string | null; + about: string | null; + threadhash: string | null; + intent: string | null; + intentSentBy: string | null; + intentTimestamp: Date; + combinedDID: string; + cid?: string; + groupInformation?: IGroup +} + export interface Feeds { msg: MessageIPFS; did: string; diff --git a/yarn.lock b/yarn.lock index 82232681fd..41eb743e7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4685,7 +4685,7 @@ __metadata: react-player: 2.9.0 react-query: ^3.39.1 react-redux: ^7.2.6 - react-router-dom: 6 + react-router-dom: ^6.9.0 react-scripts: ^5.0.1 react-scroll-to-bottom: ^4.2.0 react-select: ^5.2.2 @@ -4993,10 +4993,10 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.3.3": - version: 1.3.3 - resolution: "@remix-run/router@npm:1.3.3" - checksum: 9280f1c3e44c0fb84a74b401b5a47022dace06d5da0f26a7a68c7c0e57ad5ef95d30f3c2d333df2db3b63f84de81f7f8caa7e53189a7709d6c3eb466d126ed76 +"@remix-run/router@npm:1.4.0": + version: 1.4.0 + resolution: "@remix-run/router@npm:1.4.0" + checksum: 707dce35a2b8138005cf19e63f6fd3c4da05b4b892e9e9118e8b727c3b95953efe27307ca2df35084044df30fa1fc367cf0bbc98d1ded9020c82e61e6242caaf languageName: node linkType: hard @@ -24878,27 +24878,27 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:6": - version: 6.8.2 - resolution: "react-router-dom@npm:6.8.2" +"react-router-dom@npm:^6.9.0": + version: 6.9.0 + resolution: "react-router-dom@npm:6.9.0" dependencies: - "@remix-run/router": 1.3.3 - react-router: 6.8.2 + "@remix-run/router": 1.4.0 + react-router: 6.9.0 peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: eddc8b88e26c66408df894bdcf95efd6731e21b7cbfd7417cd456f0043916279e0559b06c6cdc19c2a55c6aefc4cc745fa4065d3505e519a95adbef0cc89e77f + checksum: 4d593491ab8db5611feda70002c62902baebb84d5c1c5e5b6172496f31f91130deee132bf4240dea634a88cb86c76d6da348f15b9cd5e5197be455efd88edf72 languageName: node linkType: hard -"react-router@npm:6.8.2": - version: 6.8.2 - resolution: "react-router@npm:6.8.2" +"react-router@npm:6.9.0": + version: 6.9.0 + resolution: "react-router@npm:6.9.0" dependencies: - "@remix-run/router": 1.3.3 + "@remix-run/router": 1.4.0 peerDependencies: react: ">=16.8" - checksum: 9e98d03e1f18bfd5a35144a0c675adaf7c46a9ad436efdea2b52ef3a6e501ac6174a67ea90004e1339cd45019d6b1eb370627518320f7af9323ae74e0c6756ad + checksum: b2a5f42e042bee7a7f116ca7817b0e58359e5353d84887c9fe7a633d7490c03b1e0ae37cd01830c2a381e3d1e7d501bb4751e53cc3d491e25f36582d3f6e0546 languageName: node linkType: hard From 193e25de09d6a35528249f1e3c182b62c87f3415 Mon Sep 17 00:00:00 2001 From: harshrajat Date: Wed, 29 Mar 2023 01:17:37 +0400 Subject: [PATCH 2/3] Enables dynamic url in chat --- package.json | 2 +- public/index-alpha.html | 2 +- public/index-dev.html | 2 +- public/index-prod.html | 2 +- public/index-staging.html | 2 +- public/index-w2w.html | 2 +- public/index.html | 2 +- src/components/chat/chatsnap/ChatSnap.tsx | 3 +- .../chat/w2wChat/chatBox/ChatBox.tsx | 135 +- src/components/chat/w2wChat/chats/Chats.tsx | 87 +- .../chat/w2wChat/messageFeed/MessageFeed.tsx | 30 +- .../chat/w2wChat/searchBar/SearchBar.tsx | 136 +- src/modules/chat/ChatModule.tsx | 54 +- src/sections/chat/ChatSidebarSection.tsx | 8 +- yarn.lock | 31600 ++++++++++++++++ 15 files changed, 31902 insertions(+), 165 deletions(-) create mode 100644 yarn.lock diff --git a/package.json b/package.json index 4083cf02d3..652a6da31c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@mui/lab": "^5.0.0-alpha.72", "@mui/material": "^5.5.0", "@pushprotocol/ledgerlive": "0.0.1", - "@pushprotocol/restapi": "0.9.0", + "@pushprotocol/restapi": "^1.0.0", "@pushprotocol/socket": "0.4.2", "@pushprotocol/uiweb": "0.5.0", "@reduxjs/toolkit": "^1.7.1", diff --git a/public/index-alpha.html b/public/index-alpha.html index 6f3ac3b160..6575be1932 100644 --- a/public/index-alpha.html +++ b/public/index-alpha.html @@ -13,7 +13,7 @@ - +