diff --git a/app/allocation/components/ConnectBox.tsx b/app/allocation/components/ConnectBox.tsx
index d14cd96..8a05c85 100644
--- a/app/allocation/components/ConnectBox.tsx
+++ b/app/allocation/components/ConnectBox.tsx
@@ -7,8 +7,6 @@ import {
} from '@worldcoin/idkit';
import { useQueryClient } from '@tanstack/react-query';
import { WorldIdIcon } from '@/public/assets/icon-components/WorldIdIcon';
-import { XIcon } from '@/public/assets/icon-components/XIcon';
-import { WarpcastIcon } from '@/public/assets/icon-components/WarpcastIcon';
import { actionId, appId } from '@/app/lib/constants';
import { useGetConnectionStatus, useWorldSignIn, useGetDelegationStatus } from '@/app/utils/getConnectionStatus';
import { CheckIcon } from '@/public/assets/icon-components/Check';
@@ -26,7 +24,6 @@ interface ConnectBoxProps {
const ConnectBox: React.FC = ({
onConnectWorldID,
- onConnectTwitter,
onConnectFarcaster,
}) => {
const { data: badges } = useGetPublicBadges();
@@ -71,7 +68,6 @@ const ConnectBox: React.FC = ({
const { mutateAsync: worldIdSignIn } = useWorldSignIn();
const { data: connectionStatus } = useGetConnectionStatus();
const { data: delegates } = useGetDelegationStatus();
- const connected = false; // tempo variable
const handleVerify = async (proof: ISuccessResult) => {
return (await worldIdSignIn(proof));
@@ -147,49 +143,21 @@ const ConnectBox: React.FC = ({
? 'Connect your X and Farcaster account to find out if someone delegated their voting power to you.'
: 'Some people have delegated their voting power to you. With great power comes great responsibility. Use it wisely.'}
- {connected
- ? (
-
-
-
-
-
- 5 people
- {' '}
- delegated to
- you
-
-
-
- Refresh
-
-
-
- )
- : (
-
-
- Connect with X (Twitter)
-
- )}
{connectionStatus?.farcaster
? (
-
+
- {delegates?.toYou?.budget.length ?? 'No'}
- {' '}
- people
+ {delegates?.toYou?.budget.length ? `${delegates?.toYou?.budget.length} people delegated to you` : 'You have no delegations'}
- {' '}
- delegated to
- you
@@ -203,7 +171,12 @@ const ConnectBox: React.FC = ({
onClick={onConnectFarcaster}
className="flex w-full items-center justify-center gap-2 rounded-lg border border-[##CBD5E0] bg-gray-100 px-4 py-2 font-semibold text-gray-800"
>
-
+
Connect with Farcaster
)}
diff --git a/app/allocation/components/WorldIdSignInSuccessModal.tsx b/app/allocation/components/WorldIdSignInSuccessModal.tsx
index 28b54ce..8afd166 100644
--- a/app/allocation/components/WorldIdSignInSuccessModal.tsx
+++ b/app/allocation/components/WorldIdSignInSuccessModal.tsx
@@ -41,7 +41,6 @@ const WorldIdSignInSuccessModal: React.FC
= ({
'holderPoints',
badges,
)}
- worldCoinVerified={badges?.worldCoinVerified}
/>
)}
diff --git a/app/comparison/card/modals/BadgesModal.tsx b/app/comparison/card/modals/BadgesModal.tsx
index 1d692be..9b3652b 100644
--- a/app/comparison/card/modals/BadgesModal.tsx
+++ b/app/comparison/card/modals/BadgesModal.tsx
@@ -37,22 +37,12 @@ const BadgesModal = ({ badges }: BadgesModalProps) => {
}
switch (badge.type) {
case BadgesEnum.HOLDER:
- if (allBadges?.worldCoinVerified) {
- return (
-
- );
- }
- // eslint-disable-next-line no-fallthrough
case BadgesEnum.DELEGATE:
return (
| string>
+ = {
+ holderPoints: {
+ Bronze: '/assets/images/badges/holder_bronze.svg',
+ Silver: '/assets/images/badges/holder_silver.svg',
+ Gold: '/assets/images/badges/holder_gold.svg',
+ Platinum: '/assets/images/badges/holder_platinum.svg',
+ Diamond: '/assets/images/badges/holder_diamond.svg',
+ Whale: '/assets/images/badges/holder_whale.svg',
+ },
+ delegatePoints: {
+ Bronze: '/assets/images/badges/delegate_bronze.svg',
+ Silver: '/assets/images/badges/delegate_silver.svg',
+ Gold: '/assets/images/badges/delegate_gold.svg',
+ Platinum: '/assets/images/badges/delegate_platinum.svg',
+ Diamond: '/assets/images/badges/delegate_diamond.svg',
+ Whale: '/assets/images/badges/delegate_whale.svg',
+ },
+ badgeholderPoints: '/assets/images/badges/badgeholder.svg',
+ recipientsPoints: '/assets/images/badges/recipient.svg',
+ };
+
const BadgeCard: React.FC = ({
type,
points,
medal,
amount,
- worldCoinVerified,
}) => {
const formatAmount = (amount: number | undefined) => {
if (amount === undefined) return '';
@@ -38,39 +58,25 @@ const BadgeCard: React.FC = ({
: amount.toString();
};
const handleBadgesImage = () => {
- switch (type) {
- case 'holderPoints':
- return '/images/badges/holder/' + medal?.toLowerCase() + '/128.svg';
- case 'delegatePoints':
- return '/images/badges/delegate/' + medal?.toLowerCase() + '/128.svg';
- case 'recipientsPoints':
- return '/images/badges/recipient/128.svg';
- case 'badgeholderPoints':
- return '/images/badges/badgeholder/128.svg';
- default:
- return '/images/badges/1.png';
+ const image = badgeImages[type];
+ if (typeof image === 'string') {
+ return image;
}
+ if (medal) {
+ return image[medal];
+ }
+ throw new Error(`Badge of type ${type} requires a medal.`);
};
const handleBadgeInfo = (amount?: number, points?: number) => {
switch (type) {
case 'holderPoints':
- if (worldCoinVerified) {
- return (
-
- );
- }
- // eslint-disable-next-line no-fallthrough
case 'delegatePoints':
return (
{
+ setShowBhModal(false);
router.push('/allocation');
}}
>
{notBhOpen
&& (
- {
open();
}}
onConnectFarcaster={() => {
setIsOpenFarcasterModal(true);
- setShowBhModal(false);
}}
- onConnectTwitter={() => {}}
+
/>
)}
diff --git a/app/utils/wallet/modals/NotBhModal.tsx b/app/utils/wallet/modals/NotBhModal.tsx
index 72e5149..88cd9a9 100644
--- a/app/utils/wallet/modals/NotBhModal.tsx
+++ b/app/utils/wallet/modals/NotBhModal.tsx
@@ -5,26 +5,24 @@ import { useRouter } from 'next/navigation';
import { shortenWalletAddress } from '@/app/comparison/utils/helpers';
import { BadgeData, getBadgeAmount, getBadgeMedal, useGetPublicBadges } from '../../getBadges';
import BadgeCard, { BadgeCardEntryType } from '../../BadgeCard';
-import { XIcon } from '@/public/assets/icon-components/XIcon';
import { WarpcastIcon } from '@/public/assets/icon-components/WarpcastIcon';
import { WorldIdIcon } from '@/public/assets/icon-components/WorldIdIcon';
import { useGetConnectionStatus, useGetDelegationStatus } from '../../getConnectionStatus';
import { CheckIcon } from '@/public/assets/icon-components/Check';
-interface SignedModalProps {
- onConnectTwitter: () => void
+interface BhModalProps {
onConnectFarcaster: () => void
open: () => void
}
-const NotBadgeHolder: React.FC = (
- { onConnectFarcaster, onConnectTwitter, open }
+
+const BadgeHolderModal: React.FC = (
+ { onConnectFarcaster, open }
) => {
const { address } = useAccount();
const { data: badges } = useGetPublicBadges();
const { data: connectionStatus } = useGetConnectionStatus();
const { data: delegates } = useGetDelegationStatus();
- const isWorldCoinVerified = badges?.worldCoinVerified ?? false;
const badgeCards = useMemo(() => {
if (!badges) return null;
const {
@@ -51,14 +49,13 @@ const NotBadgeHolder: React.FC = (
key,
badges,
)}
- worldCoinVerified={isWorldCoinVerified}
/>
);
});
}, [badges]);
const router = useRouter();
return (
-
+
Welcome to the Pairwise voting for "Retro Funding 6"
{badges && Object.keys(badges).length > 0
? (
@@ -118,13 +115,6 @@ const NotBadgeHolder: React.FC = (
)}
-
-
- Connect with X (Twitter)
-
= (
{connectionStatus?.farcaster && (
- {delegates?.toYou?.budget.length ?? 'No'}
- {' '}
- people delegated to you
+ {(delegates?.toYou?.budget.length) ? '' : ''}
@@ -180,4 +168,4 @@ const NotBadgeHolder: React.FC = (
);
};
-export default NotBadgeHolder;
+export default BadgeHolderModal;
diff --git a/public/assets/images/star-blonde.svg b/public/assets/images/star-blonde.svg
new file mode 100644
index 0000000..b6cbb10
--- /dev/null
+++ b/public/assets/images/star-blonde.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/public/images/tokens/op.png b/public/assets/images/tokens/op.png
similarity index 100%
rename from public/images/tokens/op.png
rename to public/assets/images/tokens/op.png
diff --git a/public/images/badges/badgeholder/128.svg b/public/images/badges/badgeholder/128.svg
deleted file mode 100644
index 8509af6..0000000
--- a/public/images/badges/badgeholder/128.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/bronze/128.svg b/public/images/badges/delegate/bronze/128.svg
deleted file mode 100644
index e8e7951..0000000
--- a/public/images/badges/delegate/bronze/128.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/diamond/128.svg b/public/images/badges/delegate/diamond/128.svg
deleted file mode 100644
index 9411051..0000000
--- a/public/images/badges/delegate/diamond/128.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/gold/128.svg b/public/images/badges/delegate/gold/128.svg
deleted file mode 100644
index 2509dec..0000000
--- a/public/images/badges/delegate/gold/128.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/platnium/128.svg b/public/images/badges/delegate/platnium/128.svg
deleted file mode 100644
index b5b0ec2..0000000
--- a/public/images/badges/delegate/platnium/128.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/silver/128.svg b/public/images/badges/delegate/silver/128.svg
deleted file mode 100644
index 16a55ef..0000000
--- a/public/images/badges/delegate/silver/128.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/delegate/whale/128.svg b/public/images/badges/delegate/whale/128.svg
deleted file mode 100644
index 17b25e2..0000000
--- a/public/images/badges/delegate/whale/128.svg
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/bronze/128.svg b/public/images/badges/holder/bronze/128.svg
deleted file mode 100644
index 80d8f87..0000000
--- a/public/images/badges/holder/bronze/128.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/diamond/128.svg b/public/images/badges/holder/diamond/128.svg
deleted file mode 100644
index fbaac9f..0000000
--- a/public/images/badges/holder/diamond/128.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/gold/128.svg b/public/images/badges/holder/gold/128.svg
deleted file mode 100644
index 7195f3c..0000000
--- a/public/images/badges/holder/gold/128.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/platnium/128.svg b/public/images/badges/holder/platnium/128.svg
deleted file mode 100644
index c31d3f1..0000000
--- a/public/images/badges/holder/platnium/128.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/silver/128.svg b/public/images/badges/holder/silver/128.svg
deleted file mode 100644
index eb81a58..0000000
--- a/public/images/badges/holder/silver/128.svg
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/holder/whale/128.svg b/public/images/badges/holder/whale/128.svg
deleted file mode 100644
index a22d035..0000000
--- a/public/images/badges/holder/whale/128.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/badges/recipient/128.svg b/public/images/badges/recipient/128.svg
deleted file mode 100644
index dc08f21..0000000
--- a/public/images/badges/recipient/128.svg
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-