diff --git a/extensions/apps/extensions/src/components/explore.tsx b/extensions/apps/extensions/src/components/explore.tsx index 463d6a9083..6e7feeb95d 100644 --- a/extensions/apps/extensions/src/components/explore.tsx +++ b/extensions/apps/extensions/src/components/explore.tsx @@ -1,73 +1,79 @@ 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-components/lib/components/ExtensionCard'; +import { ReactNode } from '@tanstack/react-router'; +import { useTranslation } from 'react-i18next'; +import { getExtensionTypeLabel } from '../utils/extension-utils'; -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; + const { t } = useTranslation('app-extensions'); return ( {titleLabel} - {sections.map((section, idx) => ( - - {!!latestExtensions?.length && idx === 1 && ( - - - - {latestExtensionsLabel} -