diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 7af500025..5cb4e5649 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -1,4 +1,3 @@ -import { Search } from "lucide-react"; import { useContext, useEffect, useState } from "react"; import PaginatorComponent from "../../components/PaginatorComponent"; import ShadTooltip from "../../components/ShadTooltipComponent"; @@ -138,166 +137,176 @@ export default function StorePage(): JSX.Element {
-
- - - Langflow Store - -
- { - handleGetComponents(); - }} - > - - -
-
- - Search flows and components from the community. - -
-
-
- { - setInputText(e.target.value); - }} - onKeyDown={(e) => { - if (e.key === "Enter") { - setSearchText(inputText); - } - }} - value={inputText} - /> - { - setSearchText(inputText); - }} - className="absolute bottom-0 right-4 top-0 my-auto h-6 cursor-pointer stroke-1 text-muted-foreground" - /> -
-
- - - - - - -
-
- -
- {!loadingTags && - tags.map((tag, idx) => ( - { - updateTags(tag.name); - }} - variant="outline" - size="sq" - className={cn( - "cursor-pointer", - filteredCategories.some((category) => category === tag.name) - ? "bg-beta-foreground text-background hover:bg-beta-foreground" + + +
-
- - {!loading && ( + + Search flows and components from the community. + +
+
+
+ { + setInputText(e.target.value); + }} + onKeyDown={(e) => { + if (e.key === "Enter") { + setSearchText(inputText); + } + }} + value={inputText} + /> + { + setSearchText(inputText); + }} + className={ + "absolute bottom-0 right-4 top-0 my-auto h-6 cursor-pointer stroke-1 text-muted-foreground" + + (loading ? " animate-spin" : "") + } + /> +
+
+ + + + + + +
+
+ +
+ {!loadingTags && + tags.map((tag, idx) => ( + { + updateTags(tag.name); + }} + variant="outline" + size="sq" + className={cn( + "cursor-pointer", + filteredCategories.some( + (category) => category === tag.name + ) + ? "bg-beta-foreground text-background hover:bg-beta-foreground" + : "" + )} + > + {tag.name} + + ))} +
+
+ + {(!loading || searchData.length !== 0) && ( + <> + {totalRowsCount}{" "} + {totalRowsCount !== 1 ? "results" : "result"} + + )} + + + +
+ +
+ {!loading || searchData.length !== 0 ? ( + searchData.map((item, idx) => { + return ( + <> + + + ); + }) + ) : ( <> - {totalRowsCount} {totalRowsCount !== 1 ? "results" : "result"} + + + )} - - - -
- -
- {loading ? ( - <> - - - - - ) : ( - searchData.map((item, idx) => { - return ( - <> - - - ); - }) - )} +
- - {!loading && ( -
+ {(!loading || searchData.length !== 0) && ( +