From 7859655dd092067ed6b6865fd617e51ff2f1b123 Mon Sep 17 00:00:00 2001 From: Chibuotu Amadi Date: Tue, 17 Jan 2023 23:23:03 +0100 Subject: [PATCH] feat: add heading and cta to stamp sidebar fixes: #816 Co-authored-by: Lucian --- .gitignore | 2 ++ app/components/GenericBanner.tsx | 26 ++++++++++++------------ app/components/GenericPlatform.tsx | 2 +- platforms/src/Ens/App-Bindings.ts | 6 ++++-- platforms/src/Gitcoin/App-Bindings.ts | 5 ++++- platforms/src/GnosisSafe/App-Bindings.ts | 6 ++++-- platforms/src/GtcStaking/App-Bindings.ts | 9 +++++++- platforms/src/NFT/App-Bindings.ts | 6 ++++-- platforms/src/types.ts | 9 +++++++- platforms/src/utils/platform.ts | 11 +++++++++- 10 files changed, 58 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 773c16f41d..f16f429bdf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules .env .nvmrc +.yarnrc # Logs logs @@ -12,6 +13,7 @@ pnpm-debug.log* lerna-debug.log* # Editor directories and files +.yarn/* .vscode/* !.vscode/extensions.json .idea diff --git a/app/components/GenericBanner.tsx b/app/components/GenericBanner.tsx index d80a585639..d92e976c05 100644 --- a/app/components/GenericBanner.tsx +++ b/app/components/GenericBanner.tsx @@ -1,24 +1,24 @@ -export function GenericBanner({ content }: { content: string }) { +import { PlatformBanner } from "@gitcoin/passport-platforms/dist/commonjs/utils/platform"; + +export function GenericBanner({ banner }: { banner: PlatformBanner }) { return (
-
-

{content}

-
- - {/*
-

{content.title}

-
+
+

{banner.heading}

+

{banner.content}

+
+ {banner.cta && ( - {content.link} + {banner.cta.label} -
-
*/} + )} +
); diff --git a/app/components/GenericPlatform.tsx b/app/components/GenericPlatform.tsx index 40f0182bef..96490987e6 100644 --- a/app/components/GenericPlatform.tsx +++ b/app/components/GenericPlatform.tsx @@ -389,7 +389,7 @@ export const GenericPlatform = ({ platFormGroupSpec, platform }: PlatformProps): selectedProviders={selectedProviders} setSelectedProviders={setSelectedProviders} isLoading={isLoading} - infoElement={platform.bannerContent ? : undefined} + infoElement={platform.banner ? : undefined} verifyButton={ <>