git clone https://github.com/relaycc/receiver-example-cra.git
cd receiver-example-cra
npm install
npm start
# Then navigate to http://localhost:3000 in your browser
Usage
The simplest case is to just add <Window /> and <Launcher /> to your app, making sure to pass in the user's connected wallet.
import { Window, Launcher } from '@relaycc/receiver';
function App() {
return (
<div className="App">
// The `wallet` props here come from whatever wallet connect system you are already using.
<Window />
<Launcher wallet={wallet} />
</div>
);
}
export default App;
The <Launcher /> component, when clicked will, by default, open a Receiver <Window /> with the inbox view active. To instead jump directly into a 1:1 conversation with a specific wallet (the site's support team, for example), you can pass in the peerAddress prop: