From 7baf88c39aa667961de8b17a78cb71da04bb8830 Mon Sep 17 00:00:00 2001 From: Didd Date: Wed, 20 Nov 2024 21:32:58 +0300 Subject: [PATCH 01/11] chore(): update extensions cards --- .../extensions/src/components/explore.tsx | 99 ++++++++------- .../src/components/extensions-hub.tsx | 5 +- .../src/components/pages/explore.tsx | 87 ++++++------- .../info-page/sub-pages/dev-info-page.tsx | 19 ++- .../default-extensions-list.tsx | 115 ++++++++++-------- .../installed-extensions-list.tsx | 90 ++++++++------ .../src/components/app-routes/index.tsx | 42 ++++--- .../components/pages/edit-profile/index.tsx | 14 +-- .../update-profile-mutation-cache.ts | 28 +++++ .../src/components/profile-header/index.tsx | 13 +- .../src/components/AppList/index.tsx | 96 ++++++--------- .../DynamicInfiniteScroll/index.tsx | 13 +- .../src/components/ExtensionCard/index.tsx | 111 +++++++++++++++++ .../src/components/Pill/index.tsx | 19 ++- .../src/components/ProfileNameField/index.tsx | 10 +- .../selectors/get-app-release-by-id-query.ts | 6 + libs/hooks/src/use-installed-extensions.ts | 28 ++--- libs/sdk/src/gql/index.ts | 11 +- 18 files changed, 490 insertions(+), 316 deletions(-) create mode 100644 extensions/apps/profile/src/components/pages/edit-profile/update-profile-mutation-cache.ts create mode 100644 libs/design-system-core/src/components/ExtensionCard/index.tsx diff --git a/extensions/apps/extensions/src/components/explore.tsx b/extensions/apps/extensions/src/components/explore.tsx index 463d6a9083..77220ef9aa 100644 --- a/extensions/apps/extensions/src/components/explore.tsx +++ b/extensions/apps/extensions/src/components/explore.tsx @@ -1,73 +1,72 @@ import React from 'react'; -import AppList, { App } from '@akashaorg/design-system-components/lib/components/AppList'; +import AppList from '@akashaorg/design-system-components/lib/components/AppList'; import Button from '@akashaorg/design-system-core/lib/components/Button'; import Card from '@akashaorg/design-system-core/lib/components/Card'; -import Image from '@akashaorg/design-system-core/lib/components/Image'; import Stack from '@akashaorg/design-system-core/lib/components/Stack'; import Text from '@akashaorg/design-system-core/lib/components/Text'; +import ExtensionCard, { + ExtensionCardProps, +} from '@akashaorg/design-system-core/lib/components/ExtensionCard'; +import { ReactNode } from '@tanstack/react-router'; -type TLatestExtensionsCardProps = { - buttonLabel: string; - latestExtensionsLabel: string; - latestExtensions?: App[]; - onViewAllClick: () => void; -}; - -export type TExploreProps = TLatestExtensionsCardProps & { +export type TExploreProps = { titleLabel: string; - publicImgPath?: string; - assetExtension?: string; - sections: { - assetName?: string; + popularExtensions?: ExtensionCardProps[]; + popularExtensionsLabel: string; + viewAllLabel: string; + cta: { title: string; description: string; - ctaNode: React.ReactNode; - }[]; + action: ReactNode; + }; + onViewAllClick: () => void; }; export const Explore: React.FC = props => { const { titleLabel, - publicImgPath = '/images', - assetExtension = 'webp', - sections, - latestExtensionsLabel, - latestExtensions, - buttonLabel, + popularExtensions, + popularExtensionsLabel, + viewAllLabel, + cta, onViewAllClick, } = props; return ( {titleLabel} - {sections.map((section, idx) => ( - - {!!latestExtensions?.length && idx === 1 && ( - - - - {latestExtensionsLabel} -