mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-17 07:23:09 +00:00
24 lines
445 B
TypeScript
24 lines
445 B
TypeScript
import React from 'react';
|
|
import { useWaku } from './WakuContext';
|
|
import { Button } from '@material-ui/core';
|
|
|
|
interface Props {
|
|
message: string
|
|
}
|
|
|
|
const Send = (props: Props) => {
|
|
const { waku } = useWaku();
|
|
|
|
const handleClick = async () => {
|
|
await waku!.send(props.message);
|
|
};
|
|
|
|
return (
|
|
<Button variant="contained" color="primary" size="large" onClick={handleClick}>
|
|
Send
|
|
</Button>
|
|
);
|
|
};
|
|
|
|
export default Send;
|