mirror of
https://github.com/logos-messaging/logos-messaging-frontend.git
synced 2026-01-02 13:53:13 +00:00
split keystore and chat pages
This commit is contained in:
parent
65756f0663
commit
3858b67fa8
@ -1,20 +1,25 @@
|
||||
import { Block, BlockTypes } from "@/components/Block";
|
||||
import { Title } from "@/components/Title";
|
||||
import { Status } from "@/components/Status";
|
||||
import { useStore, useWallet } from "@/hooks";
|
||||
import { useStore } from "@/hooks";
|
||||
import { Button } from "@/components/Button";
|
||||
|
||||
export const Header: React.FunctionComponent<{}> = () => {
|
||||
type HeaderProps = {
|
||||
onWalletConnect?: () => void;
|
||||
}
|
||||
|
||||
export const Header: React.FunctionComponent<HeaderProps> = (props) => {
|
||||
const { appStatus, wallet } = useStore();
|
||||
const { onWalletConnect } = useWallet();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Block className="mb-5" type={BlockTypes.FlexHorizontal}>
|
||||
<Title>Waku RLN</Title>
|
||||
<Button onClick={onWalletConnect}>
|
||||
Connect Wallet
|
||||
</Button>
|
||||
{props.onWalletConnect && (
|
||||
<Button onClick={props.onWalletConnect}>
|
||||
Connect Wallet
|
||||
</Button>
|
||||
)}
|
||||
</Block>
|
||||
<Status text="Application status" mark={appStatus} />
|
||||
{wallet && <p className="mt-3 text-sm">Wallet connected: {wallet}</p> }
|
||||
@ -1,15 +1,11 @@
|
||||
"use client";
|
||||
import { Header } from "./components/Header";
|
||||
import { Waku } from "./components/Waku";
|
||||
import { Keystore } from "./components/Keystore";
|
||||
import { KeystoreDetails } from "./components/KeystoreDetails";
|
||||
import { Header } from "@/app/components/Header";
|
||||
import { Waku } from "@/app/components/Waku";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col p-24 font-mono max-w-screen-lg m-auto">
|
||||
<Header />
|
||||
<Keystore />
|
||||
<KeystoreDetails />
|
||||
<Waku />
|
||||
</main>
|
||||
);
|
||||
|
||||
16
src/app/keystore/page.tsx
Normal file
16
src/app/keystore/page.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
import { Header } from "@/app/components/Header";
|
||||
import { Keystore } from "@/app/components/Keystore";
|
||||
import { KeystoreDetails } from "@/app/components/KeystoreDetails";
|
||||
import { useWallet } from "@/hooks";
|
||||
|
||||
export default function KeystorePage() {
|
||||
const { onWalletConnect } = useWallet();
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col p-24 font-mono max-w-screen-lg m-auto">
|
||||
<Header onWalletConnect={onWalletConnect} />
|
||||
<Keystore />
|
||||
<KeystoreDetails />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@ -52,7 +52,7 @@ class Relay {
|
||||
|
||||
this.subscriptionRoutine = window.setInterval(async () => {
|
||||
await this.fetchMessages();
|
||||
}, SECOND);
|
||||
}, 5 * SECOND);
|
||||
|
||||
this.contentTopicListeners.set(contentTopic, 1);
|
||||
} catch (error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user