Codatta Connect is a set of tools that helps quickly integrate Codatta-based login and wallet linking features into applications. Codatta Connect provide sign up UI base on react and tailwindcss.
Codatta Connect is available as an npm package.
npm i codatta-connect
Import and Initialize
import { CodattaConnectContextProvider } from "codatta-connect";
export default function App(props: { children: React.ReactNode }) {
return (
<CodattaConnectContextProvider>
{children}
</CodattaConnectContextProvider>
);
}
Use sign up UI
import { ILoginResponse, CodattaSignin } from 'codatta-connect'
export default function Signup() {
function handleLogin(res: ILoginResponse) {
// handle your login logic here
}
const config = {
channel: 'your register channel'
device: 'Devise type , available value: "WEB", "TD", "PLUG"'
app: 'your app name',
inviterCode: 'referral code'
}
return <CodattaSignin
onLogin={handleLogin}
config={config}
header={<div>Log in or sign up</div>}
/>
}
npm install
Now you can start developing. Run the following command to start the development server:
npm run dev
For you development experience, we include some vscode settings in the .vscode
directory.
We highly recommend you install the following extensions:
-
highlight syntax errors and warnings
-
IntelliSense for Tailwind CSS
-
format code