-
-
+ {event == 'frensday2023' &&
}
+
-
-
- Claim your POAP to show you met {name} at frENSday!
+
+ {state === PENDING_APPROVAL &&
}
+ {state === MINT_TO && (
+
{
+ setMintToProfile('');
+ // eslint-disable-next-line no-undef
+ localStorage?.setItem(STORAGE_NAME_KEY, '');
+ }}
+ onCallClose={() => {
+ setDismissed(true);
+ }}
+ />
+ )}
+ {state === NAME_INPUT && (
+ {
+ setMintToProfile(name);
+ // eslint-disable-next-line no-undef
+ localStorage?.setItem(
+ STORAGE_NAME_KEY,
+ name
+ );
+ }}
+ poap_name={name}
+ event_name={event_name}
+ />
+ )}
+ {/*
+
+ Claim your POAP to show you met {name} at frENSday!
+
+
+
+
+ M
+
*/}
diff --git a/components/POAPModal/SPOAPModal.tsx b/components/POAPModal/SPOAPModal.tsx
index bdad997..6459b81 100644
--- a/components/POAPModal/SPOAPModal.tsx
+++ b/components/POAPModal/SPOAPModal.tsx
@@ -7,7 +7,8 @@ import { POAPModal } from './POAPModal';
export const SPOAPModal: FC<{
data: IYKReferenceResponse;
name: string;
-}> = async ({ data, name }) => {
+ event: string;
+}> = async ({ data, name, event }) => {
if (data.poapEvents.length === 0) return;
const [iyk_poap_event_data] = data.poapEvents;
@@ -16,5 +17,7 @@ export const SPOAPModal: FC<{
if (!metadata) return;
- return
;
+ return (
+
+ );
};
diff --git a/components/POAPModal/settings.tsx b/components/POAPModal/settings.tsx
new file mode 100644
index 0000000..67c7a9e
--- /dev/null
+++ b/components/POAPModal/settings.tsx
@@ -0,0 +1 @@
+export const SHOW_POAP_ANYWAYS = false;
diff --git a/components/POAPModal/stages/MintToProfile.tsx b/components/POAPModal/stages/MintToProfile.tsx
new file mode 100644
index 0000000..08a6de2
--- /dev/null
+++ b/components/POAPModal/stages/MintToProfile.tsx
@@ -0,0 +1,82 @@
+import { formatAddress } from '@ens-tools/format';
+import clsx from 'clsx';
+import { FC, useState } from 'react';
+import { FiCheck, FiLoader } from 'react-icons/fi';
+
+const eth_address_regex = /^0x[\dA-Fa-f]{40}$/;
+
+export const MintToProfile: FC<{
+ address: string;
+ poap_name: string;
+ event_name: string;
+ onCallChange: () => void;
+ onCallClose: () => void;
+}> = ({ address, poap_name, event_name, onCallChange, onCallClose }) => {
+ const isAddress = eth_address_regex.test(address);
+ const [stage, setStage] = useState<'start' | 'minting' | 'minted'>('start');
+
+ return (
+
+
+ Mint a POAP to show you met {poap_name} at {event_name}!
+
+
+
+
+
+
+
to
+
+ {!isAddress && (
+
+
+
+ )}
+
+ {isAddress ? formatAddress(address) : address}
+
+
+
+ {stage === 'start' && (
+
+ )}
+
+
+ );
+};
diff --git a/components/POAPModal/stages/NameInput.tsx b/components/POAPModal/stages/NameInput.tsx
new file mode 100644
index 0000000..a3deee7
--- /dev/null
+++ b/components/POAPModal/stages/NameInput.tsx
@@ -0,0 +1,80 @@
+import clsx from 'clsx';
+import { FC, useState } from 'react';
+import { FiLoader, FiSearch } from 'react-icons/fi';
+
+import { useEnstate } from '../../../hooks/useEnstate';
+
+const eth_address_regex = /^0x[\dA-Fa-f]{40}$/;
+
+export const NameInput: FC<{
+ onSubmit: (_name: string) => void;
+ poap_name: string;
+ event_name: string;
+}> = ({ onSubmit, poap_name, event_name }) => {
+ const [inputData, setInputData] = useState('');
+ const [loading, setLoading] = useState(false);
+
+ const validENS = true;
+
+ return (
+
+
+ Mint a POAP to show you met {poap_name} at {event_name}!
+
+
+
+ );
+};
diff --git a/components/POAPModal/stages/PendingApproval.tsx b/components/POAPModal/stages/PendingApproval.tsx
new file mode 100644
index 0000000..a9e2d7e
--- /dev/null
+++ b/components/POAPModal/stages/PendingApproval.tsx
@@ -0,0 +1,15 @@
+export const PendingApproval = () => {
+ return (
+
+ );
+};
diff --git a/components/Records/records.tsx b/components/Records/records.tsx
index 212f506..5cd4bfd 100644
--- a/components/Records/records.tsx
+++ b/components/Records/records.tsx
@@ -2,7 +2,8 @@ import { formatRecord } from '@ens-tools/format';
import { FC } from 'react';
import { ReactNode } from 'react';
import { FaTelegram } from 'react-icons/fa';
-import { FiGithub, FiLink, FiTwitter } from 'react-icons/fi';
+import { FaXTwitter } from 'react-icons/fa6';
+import { FiGithub, FiLink } from 'react-icons/fi';
import shortNumber from 'short-number';
import { EnstateResponse } from '../../hooks/useEnstate';
@@ -18,7 +19,7 @@ const buttonControls = (key: string, value: string): ReactNode | undefined => {
href={'https://twitter.com/' + formatted}
className="btn-twitter"
>
-
+
{formatted || value}
);
diff --git a/hooks/useIYKRef.ts b/hooks/useIYKRef.ts
index 1e80bd6..81d61ea 100644
--- a/hooks/useIYKRef.ts
+++ b/hooks/useIYKRef.ts
@@ -4,7 +4,7 @@ type IYKPOAPEvent = {
id: number;
poapEventId: number;
otp: string;
- status: 'expired';
+ status: 'expired' | 'pending-approval';
};
type IYKLinkedToken = {
diff --git a/package.json b/package.json
index dc042e7..f575c9b 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"postcss": "^8.4.26",
"postcss-nested": "^6.0.1",
"react": "^18.2.0",
- "react-icons": "^4.11.0",
+ "react-icons": "^5.0.1",
"short-number": "^1.0.7",
"tailwindcss": "^3.3.3"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6f459ac..7d9da58 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,5 +1,9 @@
lockfileVersion: '6.0'
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
dependencies:
'@adraffy/ens-normalize':
specifier: ^1.10.0
@@ -26,8 +30,8 @@ dependencies:
specifier: ^18.2.0
version: 18.2.0
react-icons:
- specifier: ^4.11.0
- version: 4.11.0(react@18.2.0)
+ specifier: ^5.0.1
+ version: 5.0.1(react@18.2.0)
short-number:
specifier: ^1.0.7
version: 1.0.7
@@ -2162,8 +2166,8 @@ packages:
scheduler: 0.23.0
dev: false
- /react-icons@4.11.0(react@18.2.0):
- resolution: {integrity: sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==}
+ /react-icons@5.0.1(react@18.2.0):
+ resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==}
peerDependencies:
react: '*'
dependencies:
@@ -2704,7 +2708,3 @@ packages:
/zod@3.21.4:
resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
dev: false
-
-settings:
- autoInstallPeers: true
- excludeLinksFromLockfile: false