diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx deleted file mode 100644 index c4b0aa7..0000000 --- a/src/app/home/page.tsx +++ /dev/null @@ -1,58 +0,0 @@ -"use client"; -import { Header } from "@/app/components/Header"; -import { Waku } from "@/app/components/Waku"; -import { useWaku } from "@/hooks"; -import { DebugInfo } from "@/services/waku"; - -export default function Home() { - const { - onSend, - messages, - debugInfo, - contentTopic, - onContentTopicChange - } = useWaku(); - - return ( - - - - - - - ); -} - -type DebugInfoProps = { - value?: DebugInfo; -} - -const DebugInfo: React.FunctionComponent = (props) => { - if (!props.value) { - return; - } - - return ( - - - Show node info - - - Health: {props.value.health} - Version: {props.value.version} - ENR URI: {props.value.enrUri} - Listen Addresses: - - {props.value.listenAddresses.map((address, index) => ( - {address} - ))} - - - - ); -} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a3288c4..43fdb4d 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,8 +5,8 @@ import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "RLN Example", - description: "Showcases RLN, Keystore and generation of proofs", + title: "nwaku front-end", + description: "Send messages through you local node, register to RLN, read and export Keystore", }; export default function RootLayout({ diff --git a/src/app/page.tsx b/src/app/page.tsx index 07a6db7..4be0bc2 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,59 @@ -import Home from "@/app/home/page"; +"use client"; +import { Header } from "@/app/components/Header"; +import { Waku } from "@/app/components/Waku"; +import { useWaku } from "@/hooks"; +import { DebugInfo } from "@/services/waku"; export const dynamic = "force-static"; -export default Home; +export default function Home() { + const { + onSend, + messages, + debugInfo, + contentTopic, + onContentTopicChange + } = useWaku(); + + return ( + + + + + + + ); +} + +type DebugInfoProps = { + value?: DebugInfo; +} + +const DebugInfo: React.FunctionComponent = (props) => { + if (!props.value) { + return; + } + + return ( + + + Show node info + + + Health: {props.value.health} + Version: {props.value.version} + ENR URI: {props.value.enrUri} + Listen Addresses: + + {props.value.listenAddresses.map((address, index) => ( + {address} + ))} + + + + ); +}
Health: {props.value.health}
Version: {props.value.version}
ENR URI: {props.value.enrUri}
Listen Addresses: