Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Jul 22, 2024
1 parent e2dbe15 commit 479c43e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
7 changes: 6 additions & 1 deletion examples/passport/wallets-with-nextjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"extends": ["next/core-web-vitals", "next"]
"extends": ["next/core-web-vitals", "next"],
"settings": {
"next": {
"rootDir": "examples/passport/wallets-with-nextjs"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { config, passport } from '@imtbl/sdk';
import { useCallback, useEffect, useState } from 'react';
import { ethers } from 'ethers';
import { ProviderEvent } from '@imtbl/sdk/passport';
import { passportInstance } from '../page';
import { passportInstance } from '../../passport';

export default function Connect() {

Expand Down
19 changes: 0 additions & 19 deletions examples/passport/wallets-with-nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
'use client';

import { config, passport } from '@imtbl/sdk';

// create the Passport instance and export it so it can be used in the examples
export const passportInstance = new passport.Passport({
baseConfig: {
environment: config.Environment.SANDBOX,
publishableKey: process.env.NEXT_PUBLIC_PUBLISHABLE_KEY ?? "", // replace with your publishable API key from Hub
},
clientId: process.env.NEXT_PUBLIC_CLIENT_ID ?? "", // replace with your client ID from Hub
redirectUri: 'http://localhost:3000/redirect', // replace with one of your redirect URIs from Hub
logoutRedirectUri: 'http://localhost:3000/logout', // replace with one of your logout URIs from Hub
audience: 'platform_api',
scope: 'openid offline_access email transact',
popupOverlayOptions: {
disableGenericPopupOverlay: false, // Set to true to disable the generic pop-up overlay
disableBlockedPopupOverlay: false, // Set to true to disable the blocked pop-up overlay
}
});

export default function Home() {

return (<>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { passportInstance } from '../page';
import { passportInstance } from "../../passport";

export default function Redirect() {

Expand Down
19 changes: 19 additions & 0 deletions examples/passport/wallets-with-nextjs/passport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

import { config, passport } from '@imtbl/sdk';

// create the Passport instance and export it so it can be used in the examples
export const passportInstance = new passport.Passport({
baseConfig: {
environment: config.Environment.SANDBOX,
publishableKey: process.env.NEXT_PUBLIC_PUBLISHABLE_KEY ?? "", // replace with your publishable API key from Hub
},
clientId: process.env.NEXT_PUBLIC_CLIENT_ID ?? "CLIENT_ID", // replace with your client ID from Hub
redirectUri: 'http://localhost:3000/redirect', // replace with one of your redirect URIs from Hub
logoutRedirectUri: 'http://localhost:3000/logout', // replace with one of your logout URIs from Hub
audience: 'platform_api',
scope: 'openid offline_access email transact',
popupOverlayOptions: {
disableGenericPopupOverlay: false, // Set to true to disable the generic pop-up overlay
disableBlockedPopupOverlay: false, // Set to true to disable the blocked pop-up overlay
}
});
5 changes: 1 addition & 4 deletions examples/passport/wallets-with-nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit 479c43e

Please sign in to comment.