inertialrush-game-test
Version:
This package enables the integration of the Inertial Rush game into any React application, making it easy to showcase the game.
37 lines (27 loc) • 812 B
Markdown
This package enables the integration of the Inertial Rush game into any React application, making it easy to showcase the game.
```bash
npm i inertialrush-game
```
```javascript
import React from "react";
import { useWallet } from "@aptos-labs/wallet-adapter-react";
import { InertialRushGame } from "inertialrush-game";
function InertialRushGame() {
const { account, signAndSubmitTransaction } = useWallet();
const setConnectModalOpen = async (isOpen) => {
console.log(isOpen);
};
return (
<InertialRushGame
signAndSubmitTransaction={signAndSubmitTransaction}
setConnectModalOpen={setConnectModalOpen}
accountAddress={account?.address?.toString()}
/>
);
}
export default InertialRushGame;
```