misc changes and added method stub for encryption support
This commit is contained in:
parent
eb76e7203b
commit
3ceee1db4f
2 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,10 @@ import strings from "../Intl/strings.json";
|
|||
import { LangContext } from "../context";
|
||||
import { connectionAddress, endpoints } from "../consts";
|
||||
const Chat = ({ user }: { user: string }): React.ReactElement => {
|
||||
const encryptMessage = (plaintext: string) => {
|
||||
const ciphertext = plaintext;
|
||||
return ciphertext;
|
||||
}
|
||||
const lang = useContext(LangContext);
|
||||
const chatPage = strings[lang].chat;
|
||||
const [messages, setMessages] = useState<ReactElement[]>([]);
|
||||
|
@ -78,7 +82,7 @@ const Chat = ({ user }: { user: string }): React.ReactElement => {
|
|||
type: MessageType.MESSAGE,
|
||||
fromUserId: user,
|
||||
toUserId: "everyone",
|
||||
content: entryElement.value,
|
||||
content: encryptMessage(entryElement.value),
|
||||
timeMillis: Date.now(),
|
||||
};
|
||||
console.log(
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { useState } from "react";
|
||||
import "./Sidebar.css";
|
||||
import { SidebarMenu } from "./Components/SidebarMenu";
|
||||
export const Sidebar = ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue