Skip to content

Commit

Permalink
build: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hfdem committed Sep 24, 2024
1 parent 3c189a8 commit 7b13443
Show file tree
Hide file tree
Showing 12 changed files with 4,187 additions and 2,401 deletions.
5,198 changes: 3,376 additions & 1,822 deletions client/package-lock.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
"private": true,
"dependencies": {
"@chat-e2ee/service": "file:../service",
"@types/jest": "^29.5.2",
"@types/node": "^20.2.5",
"@types/react": "^18.2.9",
"@types/react-dom": "^18.2.4",
"qrcode.react": "^3.1.0",
"react": "^16.13.1",
"react-bootstrap": "^1.5.2",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.1",
"typescript-plugin-css-modules": "^5.0.1"
"qrcode.react": "^4.0.1",
"react": "^18.3.1",
"react-bootstrap": "^2.10.4",
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.26.2"
},
"devDependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"react-scripts": "^5.0.1",
"typescript-plugin-css-modules": "^5.1.0",
"@types/jest": "^29.5.13",
"@types/node": "^22.5.5",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/react-router-dom": "^5.3.3",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-promise": "4.1.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"html-webpack-plugin": "^5.5.1",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-promise": "7.1.0",
"eslint-plugin-react": "7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"html-webpack-plugin": "^5.6.0",
"typescript": "^4.9.5"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/LinkDisplay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FiLink, FiCopy, FiExternalLink, FiArrowDown, FiArrowUp } from "react-ic
import styles from "./Style.module.css";
import { ThemeContext } from "../../ThemeContext";
import { LinkObjType } from "@chat-e2ee/service";
import QRCode from "qrcode.react";
import { QRCodeSVG } from 'qrcode.react';

const LinkDisplay: React.FC<{ content: LinkObjType }> = ({ content }) => {
const chatLink =
Expand Down Expand Up @@ -91,7 +91,7 @@ const LinkDisplay: React.FC<{ content: LinkObjType }> = ({ content }) => {
</div>
{showQR && (
<div className={styles.qrCodeContainer}>
<QRCode value={chatLink} size={128} />
<QRCodeSVG value={chatLink} size={128} />
</div>
)}
</div>
Expand Down
10 changes: 5 additions & 5 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ChatLink from "./pages/chatlink";
import Messaging from "./pages/messaging";
import { ThemeProvider, ThemeContext } from "./ThemeContext";

import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";

const App = () => {
const [darkMode] = useContext(ThemeContext);
Expand All @@ -18,10 +18,10 @@ const App = () => {
>
<Router>
<div className={styles.bodyContent}>
<Switch>
<Route exact path="/" component={ChatLink} />
<Route exact path="/chat/:channelID" component={Messaging} />
</Switch>
<Routes>
<Route path="/" element={<ChatLink />} />
<Route path="/chat/:channelID" element={<Messaging />} />
</Routes>
</div>
</Router>
</div>
Expand Down
9 changes: 5 additions & 4 deletions client/src/pages/messaging/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
import { useHistory, useParams } from 'react-router-dom';
import { useNavigate, useParams } from 'react-router-dom';

import {
createChatInstance, utils, TypeUsersInChannel, setConfig
Expand Down Expand Up @@ -49,12 +49,13 @@ const Chat = () => {
const [deliveredID, setDeliveredID] = useState<string[]>([]);
const [darkMode] = useContext(ThemeContext);
const [linkActive, setLinkActive] = useState(true);
const history = useHistory();
const navigate = useNavigate();

const myKeyRef = useRef<{ privateKey?: string } | null>();
const notificationTimer = useRef<number | undefined>(undefined);

const { channelID }: { channelID: string } = useParams();
const params = useParams<{ channelID: string }>();
const channelID = params.channelID;

let userId = getUserSessionID(channelID);
// if not in session, lets create one and store.
Expand Down Expand Up @@ -164,7 +165,7 @@ const Chat = () => {
const handleDeleteLink = async () => {
setLinkActive(false);
await chate2ee.delete();
history.push("/");
navigate("/");
};

const initChat = async () => {
Expand Down
Loading

0 comments on commit 7b13443

Please sign in to comment.