From b789e586246f54f70aa6fbc85ec3717fe52ec181 Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Fri, 16 Dec 2022 20:02:29 +0100 Subject: [PATCH] added emptyscreen for app store search (#6065) * added emptyscreen for app store search * nit --- packages/ui/v2/core/apps/AllApps.tsx | 33 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/ui/v2/core/apps/AllApps.tsx b/packages/ui/v2/core/apps/AllApps.tsx index cb63fb5765..5f551b57d4 100644 --- a/packages/ui/v2/core/apps/AllApps.tsx +++ b/packages/ui/v2/core/apps/AllApps.tsx @@ -2,12 +2,13 @@ import { useAutoAnimate } from "@formkit/auto-animate/react"; import type { Credential } from "@prisma/client"; import { useRouter } from "next/router"; import { UIEvent, useEffect, useRef, useState } from "react"; -import { ChevronLeft, ChevronRight } from "react-feather"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { App } from "@calcom/types/App"; +import { Icon } from "@calcom/ui"; +import EmptyScreen from "../EmptyScreen"; import AppCard from "./AppCard"; export function useShouldShowArrows() { @@ -73,7 +74,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr {leftVisible && ( @@ -116,7 +117,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr )} @@ -137,7 +138,7 @@ export default function AllApps({ apps, searchText }: AllAppsPropsType) { }); if (searchText) { - enableAnimation(false); + enableAnimation && enableAnimation(false); } useEffect(() => { @@ -161,15 +162,21 @@ export default function AllApps({ apps, searchText }: AllAppsPropsType) { return (
-
- {filteredApps.length - ? filteredApps.map((app) => ( - - )) - : t("no_results")} -
+ {filteredApps.length ? ( +
+ {filteredApps.map((app) => ( + + ))}{" "} +
+ ) : ( + + )}
); }