From c1a721b6b46ab2d405e3b27cee1089688f47b63b Mon Sep 17 00:00:00 2001 From: Andraz <69682837+andyv09@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:24:43 +0200 Subject: [PATCH] fix: mobile layout & skeleton improvements (#22) Co-authored-by: martines3000 --- .../EndorseForm/EndorsementModal.tsx | 22 ++++---- .../src/components/Endorsee/EndorseeBadge.tsx | 32 +++++++++++- .../components/EndorsementView/Details.tsx | 11 ++-- ...vigation.tsx => EndorsementNavigation.tsx} | 8 +-- .../components/EndorsementView/Overview.tsx | 12 ++++- .../src/components/EndorsementView/index.tsx | 52 +++++++++++-------- 6 files changed, 93 insertions(+), 44 deletions(-) rename packages/dapp/src/components/EndorsementView/{FeedNavigation.tsx => EndorsementNavigation.tsx} (87%) diff --git a/packages/dapp/src/components/EndorseForm/EndorsementModal.tsx b/packages/dapp/src/components/EndorseForm/EndorsementModal.tsx index 8754bcc..832225f 100644 --- a/packages/dapp/src/components/EndorseForm/EndorsementModal.tsx +++ b/packages/dapp/src/components/EndorseForm/EndorsementModal.tsx @@ -46,16 +46,18 @@ export const EndorsementModal = ({ -
-
-
- {endorsee} -
-
- {endorsementType === 'Based energy 🔵' ? 'for' : 'as a'} -
-
- {endorsementType} +
+
+
+
+ {endorsee} +
+
+ {endorsementType === 'Based energy 🔵' ? 'for' : 'as a'} +
+
+ {endorsementType} +
diff --git a/packages/dapp/src/components/Endorsee/EndorseeBadge.tsx b/packages/dapp/src/components/Endorsee/EndorseeBadge.tsx index 5e161f7..93efb7d 100644 --- a/packages/dapp/src/components/Endorsee/EndorseeBadge.tsx +++ b/packages/dapp/src/components/Endorsee/EndorseeBadge.tsx @@ -112,12 +112,26 @@ export const EndorseeBadge = ({ avatar={user.avatar} address={user.address} size="2xl" + className="md:block hidden" + /> + +
+
-
-
+
+
{user.handle}
diff --git a/packages/dapp/src/components/EndorsementView/Details.tsx b/packages/dapp/src/components/EndorsementView/Details.tsx index f6545eb..4a8ce0c 100644 --- a/packages/dapp/src/components/EndorsementView/Details.tsx +++ b/packages/dapp/src/components/EndorsementView/Details.tsx @@ -9,12 +9,11 @@ import { } from '@/components/ui/tooltip'; import { InformationCircleIcon } from '@heroicons/react/24/outline'; import Link from 'next/link'; -import { DocumentDuplicateIcon } from '@heroicons/react/24/outline'; import { EXPLORERS } from '@/lib/contracts/explorers'; -import { useAccount } from 'wagmi'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; import { CopyIcon } from '../CopyIcon'; +import { formatAddress } from '@/utils'; dayjs.extend(relativeTime); @@ -35,7 +34,7 @@ const LabelField = ({ description, }: { label: string; description: string }) => { return ( -
+
@@ -66,7 +65,7 @@ export const Details = ({ }: DetailsProps) => { return (
-
+
{endorserAvatar} - {endorserAddress} + {formatAddress(endorserAddress)}
@@ -101,7 +100,7 @@ export const Details = ({ description="Revoked endorsements are no longer valid" />
{revoked ? 'Invalid' : 'Valid'}
-
+
{ +export const EndorsementNavigation = ({ + endorsementTab, +}: EndorsementNavigationProps) => { const pathname = usePathname(); const searchParams = useSearchParams(); const params = new URLSearchParams(searchParams); @@ -15,7 +17,7 @@ export const FeedNavigation = ({ endorsementTab }: FeedNavigationProps) => { return (
-
+
- +