diff --git a/examples/web-chat/src/App.tsx b/examples/web-chat/src/App.tsx
index 51ec1f0..e1223e3 100644
--- a/examples/web-chat/src/App.tsx
+++ b/examples/web-chat/src/App.tsx
@@ -5,7 +5,6 @@ import "./App.css";
import handleCommand from "./command";
import Room from "./Room";
import { WakuContext } from "./WakuContext";
-import { ThemeProvider } from "@livechat/ui-kit";
import { generate } from "server-name-generator";
import { Message } from "./Message";
import { LightNode } from "@waku/interfaces";
@@ -14,35 +13,6 @@ import { PageDirection } from "@waku/interfaces";
import { useWaku, useFilterMessages, useStoreMessages } from "@waku/react";
-const themes = {
- AuthorName: {
- css: {
- fontSize: "1.1em",
- },
- },
- Message: {
- css: {
- margin: "0em",
- padding: "0em",
- fontSize: "0.83em",
- },
- },
- MessageText: {
- css: {
- margin: "0em",
- padding: "0.1em",
- paddingLeft: "1em",
- fontSize: "1.1em",
- },
- },
- MessageGroup: {
- css: {
- margin: "0em",
- padding: "0.2em",
- },
- },
-};
-
export const ChatContentTopic = "/toy-chat/2/huilong/proto";
const ChatDecoder = new Decoder(ChatContentTopic);
@@ -96,22 +66,20 @@ export default function App() {
style={{ height: "100vh", width: "100vw", overflow: "hidden" }}
>
-
- {
- handleCommand(input, node, setNick).then(
- ({ command, response }) => {
- const commandMessages = response.map((msg) => {
- return Message.fromUtf8String(command, msg);
- });
- console.log("trying to send", commandMessages);
- }
- );
- }}
- />
-
+ {
+ handleCommand(input, node, setNick).then(
+ ({ command, response }) => {
+ const commandMessages = response.map((msg) => {
+ return Message.fromUtf8String(command, msg);
+ });
+ console.log("trying to send", commandMessages);
+ }
+ );
+ }}
+ />
);
diff --git a/examples/web-chat/src/index.tsx b/examples/web-chat/src/index.tsx
index 5559780..967ee76 100644
--- a/examples/web-chat/src/index.tsx
+++ b/examples/web-chat/src/index.tsx
@@ -1,5 +1,6 @@
import React from "react";
import ReactDOM from "react-dom";
+import { ThemeProvider } from "@livechat/ui-kit";
import { LightNodeProvider } from "@waku/react";
import { wakuDnsDiscovery } from "@waku/dns-discovery";
import { Protocols } from "@waku/interfaces";
@@ -26,11 +27,42 @@ const options = {
const protocols = [Protocols.Filter, Protocols.Store, Protocols.LightPush];
+const THEMES = {
+ AuthorName: {
+ css: {
+ fontSize: "1.1em",
+ },
+ },
+ Message: {
+ css: {
+ margin: "0em",
+ padding: "0em",
+ fontSize: "0.83em",
+ },
+ },
+ MessageText: {
+ css: {
+ margin: "0em",
+ padding: "0.1em",
+ paddingLeft: "1em",
+ fontSize: "1.1em",
+ },
+ },
+ MessageGroup: {
+ css: {
+ margin: "0em",
+ padding: "0.2em",
+ },
+ },
+};
+
ReactDOM.render(
-
-
-
+
+
+
+
+
,
document.getElementById("root")
);