Skip to content

Commit

Permalink
fix: merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
akp111 committed Nov 15, 2023
2 parents 03b1685 + 5c83514 commit 3b06ae1
Show file tree
Hide file tree
Showing 77 changed files with 8,806 additions and 7,564 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react-router-dom": "6.3.0",
"regenerator-runtime": "0.13.7",
"socket.io-client": "^4.5.2",
"styled-components": "^5.3.5",
"styled-components": "^6.0.8",
"tiny-invariant": "^1.2.0",
"ts-mocha": "^10.0.0",
"tslib": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext } from 'react';
import { Web3Provider } from '@ethersproject/providers';
import { Chat, ITheme } from '@pushprotocol/uiweb';
import { SupportChat, ITheme } from '@pushprotocol/uiweb';
import { lightTheme } from '@pushprotocol/uiweb';
import { EnvContext, Web3Context } from './context';

Expand Down Expand Up @@ -31,10 +31,11 @@ export const ChatSupportTest = () => {
};

return (
<Chat
account={account}
//works as Chat as well as Support Chat
<SupportChat

signer={librarySigner}
supportAddress="0xD2A371cAFBE09333F6668229E4BD33196583c325"
supportAddress="0x6F7919412318E65109c5698bd0E640fc33DE2337"
apiKey="tAWEnggQ9Z.UaDBNjrvlJZx3giBTIQDcT8bKQo1O1518uF1Tea7rPwfzXv2ouV5rX9ViwgJUrXm"
env={env}
greetingMsg="How can i help you?"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled from 'styled-components';

import { Section } from '../components/StyledComponents';
import { CreateGroupModal } from "@pushprotocol/uiweb";
import { ChatViewComponent } from '@pushprotocol/uiweb';
import { CreateGroupModal, MODAL_BACKGROUND_TYPE, MODAL_POSITION_TYPE } from "@pushprotocol/uiweb";
import { ChatView } from '@pushprotocol/uiweb';

const ChatViewComponentTest = () => {
const chatFilterList = [
Expand All @@ -15,7 +15,17 @@ const ChatViewComponentTest = () => {
<h2>Chat UI Test page</h2>
<CreateGroupModal onClose={()=>{console.log('in close')}} />
<ChatViewComponentCard>
<ChatViewComponent onGetTokenClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='4ac5ab85c9c3d57adbdf2dba79357e56b2f9ef0256befe750d9f93af78d2ca68' limit={10} isConnected={true} />
<CreateGroupModal onClose={()=>{console.log('in close')}} modalBackground={MODAL_BACKGROUND_TYPE.OVERLAY} modalPositionType={MODAL_POSITION_TYPE.RELATIVE}/>

<ChatView
onVerificationFail={() => console.log("BOIIII RETURNNNSSSSS")}
chatId='4ac5ab85c9c3d57adbdf2dba79357e56b2f9ef0256befe750d9f93af78d2ca68'
limit={10}
isConnected={true}
groupInfoModalBackground={MODAL_BACKGROUND_TYPE.OVERLAY}
groupInfoModalPositionType={MODAL_POSITION_TYPE.RELATIVE}
verificationFailModalPosition={MODAL_POSITION_TYPE.RELATIVE}
/>
</ChatViewComponentCard>
</div>
);
Expand All @@ -24,7 +34,8 @@ const ChatViewComponentTest = () => {
export default ChatViewComponentTest;

const ChatViewComponentCard = styled(Section)`
height: 60vh;
height: 80vh;
position:relative;
`;
//c2d544ad9d1efd5c5a593b143bf8232875c926cf28015564e70ad078b95f807e
//4ac5ab85c9c3d57adbdf2dba79357e56b2f9ef0256befe750d9f93af78d2ca68
8 changes: 6 additions & 2 deletions packages/examples/sdk-frontend-react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import SearchSpaceTest from './SpaceTest/SearchSpaceTest';
import SearchGroupTest from './ChatTest/SearchGroupTest';
import RejectRequestTest from './ChatTest/RejectRequestTest';
import GetGroupMemberStatusTest from './ChatTest/GetGroupMemberStatusTest';
import { ChatSupportTest } from './ChatSupportTest';


window.Buffer = window.Buffer || Buffer;
Expand Down Expand Up @@ -313,7 +314,7 @@ export function App() {
<Web3Context.Provider value={{ account, active, library, chainId }}>
<SocketContext.Provider value={socketData}>
<AccountContext.Provider value={{ pgpPrivateKey, setSpaceId }}>
<ChatUIProvider env={env} theme={darkChatTheme} account={account} pgpPrivateKey={pgpPrivateKey} signer={signer}>
<ChatUIProvider env={env} theme={lightChatTheme} >
<SpacesUIProvider spaceUI={spaceUI} theme={customDarkTheme}>
<Routes>
<Route
Expand Down Expand Up @@ -559,7 +560,10 @@ export function App() {
<Route
path="ChatProfile"
element={<ChatProfileTest />}
/>
/> <Route
path="ChatSupport"
element={<ChatSupportTest />}
/>
</Routes>
{/* <ChatWidgetTest/> */}
{/* <ChatWidgetTest /> */}
Expand Down
553 changes: 553 additions & 0 deletions packages/restapi/CHANGELOG.md

Large diffs are not rendered by default.

Loading

0 comments on commit 3b06ae1

Please sign in to comment.