mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* first version of the pack * single entry point * add custom components to the package * move form components to toolkit * add more utils and hooks to the package * minor fixes * add CI workflow * update readme and package.json * fix ts * fix build of env-validator * fix docker build * fix icons size * test fixes * more test fixes
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
|
|
import { MarketplaceCategory } from 'types/client/marketplace';
|
|
|
|
import config from 'configs/app';
|
|
import { Link } from 'toolkit/chakra/link';
|
|
import { apos } from 'toolkit/utils/htmlEntities';
|
|
import EmptySearchResultDefault from 'ui/shared/EmptySearchResult';
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
const feature = config.features.marketplace;
|
|
|
|
type Props = {
|
|
favoriteApps: Array<string>;
|
|
selectedCategoryId?: string;
|
|
};
|
|
|
|
const EmptySearchResult = ({ favoriteApps, selectedCategoryId }: Props) => (
|
|
<EmptySearchResultDefault
|
|
text={
|
|
(selectedCategoryId === MarketplaceCategory.FAVORITES && !favoriteApps.length) ? (
|
|
<>
|
|
You don{ apos }t have any favorite apps.<br/>
|
|
Click on the <IconSvg name="heart_outline" boxSize={ 5 } mb={ -1 } color="gray.400"/> icon on the app{ apos }s card to add it to Favorites.
|
|
</>
|
|
) : (
|
|
<>
|
|
No matching apps found.
|
|
{ 'suggestIdeasFormUrl' in feature && (
|
|
<>
|
|
{ ' ' }Have a groundbreaking idea or app suggestion?<br/>
|
|
<Link external href={ feature.suggestIdeasFormUrl }>Share it with us</Link>
|
|
</>
|
|
) }
|
|
</>
|
|
)
|
|
}
|
|
/>
|
|
);
|
|
|
|
export default React.memo(EmptySearchResult);
|