Login / Logout

Log in / Log Out Widgets and Modals

Post Method Widgets and Modals

import { hooks } from '@paytweed/frontend-sdk-react'

Mutation Parameters​

NameTypeRequiredDefaultDescription

widget parameters

Widget parameters

Usage Example​

const [sendCoin] = hooks.useSendCoinToUser({
  callbacks: {
    onSuccess: () => {
      console.log('Success')
    },
    onError: () => {
      console.log('Error')
    },
    settings: {
      preventClose: true,
    },
  },
})

Login​

Description​

The Login mutation allows the user to log in to their wallet.

Usage Example​​

const [login] = hooks.useLogin()

login()

Logout​

Description​

The Logout mutation allows the user to log out from their wallet.

Usage Example​

const [logout] = hooks.useWalletLogout()

logout()

Last updated