Skip to content

Commit

Permalink
Update code snippets in README.md to use .tsx extension for TypeScrip…
Browse files Browse the repository at this point in the history
…t files and reflect the correct syntax for JSX components
  • Loading branch information
Royal-lobster committed Sep 2, 2024
1 parent f9bc021 commit 68ff48e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID=YOUR_CLIENT_ID
```

2. Add the package to your Tailwind CSS configuration:
```ts
```tsx
// tailwind.config.ts
import type { Config } from "tailwindcss";

Expand All @@ -40,7 +40,7 @@ export default config;

3. Wrap your application with the RainbowKitClientProvider in your layout file:

```typescript
```tsx
// app/layout.tsx
import { RainbowKitClientProvider } from "@everipedia/iq-login";

Expand All @@ -60,14 +60,13 @@ export default function RootLayout({
```

4. Add login page to your application.
```ts
```tsx
import { Login } from '@everipedia/iq-login';

// In your component or page
const LoginPage = () => {
return (
<div>
<h1>Login</h1>
<Login />
</div>
);
Expand All @@ -82,7 +81,7 @@ export default LoginPage;
The package provides a custom hook called useAuth that can be used to get the current user's information.
It can be used to re-sign token, get the current token, and check if the user is authenticated.

```ts
```tsx
import { useAuth } from '@everipedia/iq-login';

function MyComponent() {
Expand Down

0 comments on commit 68ff48e

Please sign in to comment.