diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 18096c0..0000000 --- a/next.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - images: { - domains: [ - 'waku.org', - 'logos.co', - 'contributors.free.technology' - ], - }, - reactStrictMode: true, - output: 'export', -} - -module.exports = nextConfig \ No newline at end of file diff --git a/next.config.ts b/next.config.ts index e9ffa30..e07c750 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,14 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ -}; + images: { + domains: [ + 'waku.org', + 'logos.co', + 'contributors.free.technology' + ], + }, + reactStrictMode: true, +} -export default nextConfig; +module.exports = nextConfig diff --git a/src/app/page.tsx b/src/app/page.tsx index 7a945fd..2b832be 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,8 +8,8 @@ import { KeystoreManagement } from '../components/Tabs/KeystoreTab/KeystoreManag export default function Home() { return ( - - + + ); } \ No newline at end of file diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 141ce8a..a0cc754 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -15,20 +15,15 @@ const tabs = [ }, ]; -const componentToTabId: Record = { - MembershipRegistration: 'membership', - KeystoreManagement: 'keystore', -}; - export function Layout({ children }: { children: React.ReactNode }) { const { activeTab, setActiveTab } = useAppState(); const childrenArray = Children.toArray(children); const getTabContent = (tabId: string) => { return childrenArray.find((child) => { - if (isValidElement(child) && typeof child.type === 'function') { - const componentName = child.type.name; - return componentToTabId[componentName] === tabId; + if (isValidElement(child)) { + const props = child.props as { tabId?: string }; + return props.tabId === tabId; } return false; }); diff --git a/src/components/Tabs/KeystoreTab/KeystoreManagement.tsx b/src/components/Tabs/KeystoreTab/KeystoreManagement.tsx index ff35095..ee50193 100644 --- a/src/components/Tabs/KeystoreTab/KeystoreManagement.tsx +++ b/src/components/Tabs/KeystoreTab/KeystoreManagement.tsx @@ -31,7 +31,12 @@ interface ExtendedMembershipInfo extends Omit { token: string; } -export function KeystoreManagement() { +interface KeystoreManagementProps { + tabId?: string; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function KeystoreManagement({ tabId: _tabId }: KeystoreManagementProps) { const { hasStoredCredentials, storedCredentialsHashes, diff --git a/src/components/Tabs/MembershipTab/MembershipRegistration.tsx b/src/components/Tabs/MembershipTab/MembershipRegistration.tsx index a564d5b..4801c90 100644 --- a/src/components/Tabs/MembershipTab/MembershipRegistration.tsx +++ b/src/components/Tabs/MembershipTab/MembershipRegistration.tsx @@ -11,7 +11,12 @@ import { Button } from '../../ui/button'; import { membershipRegistration, type ContentSegment } from '../../../content/index'; import { toast } from 'sonner'; -export function MembershipRegistration() { +interface MembershipRegistrationProps { + tabId?: string; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function MembershipRegistration({ tabId: _tabId }: MembershipRegistrationProps) { const { registerMembership, isInitialized, isStarted, rateMinLimit, rateMaxLimit, error, isLoading } = useRLN(); const { isConnected, chainId } = useWallet();