diff --git a/package-lock.json b/package-lock.json index b18608e..7e08187 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,10 @@ "name": "sample-chat-app", "version": "0.0.0", "dependencies": { - "@likeminds.community/likeminds-chat-reactjs": "^1.7.1", + "@likeminds.community/likeminds-chat-reactjs": "^1.0.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.22.3" + "react-router-dom": "^6.0.0" }, "devDependencies": { "@eslint/js": "^9.33.0", @@ -4190,18 +4190,6 @@ } } }, - "node_modules/@likeminds.community/likeminds-chat-reactjs/node_modules/@types/react": { - "version": "18.3.23", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz", - "integrity": "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, "node_modules/@likeminds.community/likeminds-chat-reactjs/node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -7400,13 +7388,6 @@ "dev": true, "license": "ISC" }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "license": "MIT", - "peer": true - }, "node_modules/js-cookie": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", @@ -9291,21 +9272,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 84e3967..4b67e96 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "preview": "vite preview" }, "dependencies": { - "@likeminds.community/likeminds-chat-reactjs": "^1.7.1", + "@likeminds.community/likeminds-chat-reactjs": "^1.0.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.22.3" + "react-router-dom": "^6.0.0" }, "devDependencies": { "@eslint/js": "^9.33.0", diff --git a/src/App.css b/src/App.css index b9d355d..e69de29 100644 --- a/src/App.css +++ b/src/App.css @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..2bf8676 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,35 +1,41 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import { useState } from 'react'; +import { + LMClientOverlayProvider, + LMChannel, + initiateLMClient, + LMChatTheme, +} from '@likeminds.community/likeminds-chat-reactjs'; +import { Routes, Route } from 'react-router-dom'; function App() { - const [count, setCount] = useState(0) + const [userDetails] = useState<{ + apiKey?: string; + uuid?: string; + username?: string; + }>({ + apiKey: 'aca40392-f386-4c58-b9dd-7f59a50de207', + uuid: '81f15acc-e32b-42a7-9f6c-6f1a21260f03', + username: 'TestUser', + }); + + const lmChatClient = initiateLMClient(); return ( - <> -
-
- Edit src/App.tsx and save to test HMR
-
- Click on the Vite and React logos to learn more -
- > - ) +