Skip to content

Commit 88979af

Browse files
committed
updated component name
1 parent ac03601 commit 88979af

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/components/ProductCatalog.tsx renamed to src/components/DirectoryCatalog.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Filters = {
1313
groups: string[];
1414
};
1515

16-
const ProductCatalog = ({ products }: { products: ProductData[] }) => {
16+
const DirectoryCatalog = ({ products }: { products: ProductData[] }) => {
1717
const [filters, setFilters] = useState<Filters>({
1818
search: "",
1919
groups: [],
@@ -74,7 +74,7 @@ const ProductCatalog = ({ products }: { products: ProductData[] }) => {
7474
<input
7575
type="text"
7676
className="mb-8 w-full rounded-md border-2 border-gray-200 bg-white px-2 py-2 dark:border-gray-700 dark:bg-gray-800"
77-
placeholder="Search products"
77+
placeholder="Search folders"
7878
value={filters.search}
7979
onChange={(e) => setFilters({ ...filters, search: e.target.value })}
8080
/>
@@ -116,7 +116,7 @@ const ProductCatalog = ({ products }: { products: ProductData[] }) => {
116116
<div className="mt-0! grid w-full grid-cols-1 items-stretch gap-2 self-start md:grid-cols-2 lg:w-3/4 lg:grid-cols-3 lg:gap-4">
117117
{productList.length === 0 && (
118118
<div className="flex w-full flex-col justify-center rounded-md border bg-gray-50 py-6 text-center align-middle md:col-span-2 lg:col-span-3 dark:border-gray-500 dark:bg-gray-800">
119-
<span className="text-lg font-bold!">No products found</span>
119+
<span className="text-lg font-bold!">No folders found</span>
120120
<p>
121121
Try a different search term, or broaden your search by removing
122122
filters.
@@ -163,4 +163,4 @@ const ProductCatalog = ({ products }: { products: ProductData[] }) => {
163163
);
164164
};
165165

166-
export default ProductCatalog;
166+
export default DirectoryCatalog;

src/pages/directory.astro

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { getCollection, type CollectionEntry } from "astro:content";
44
import iconCollection from "virtual:astro-icon";
55
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
66
import { getIconData, iconToSVG } from "@iconify/utils";
7-
import ProductCatalog from "~/components/ProductCatalog";
8-
import type { ProductData } from "~/components/ProductCatalog";
7+
import DirectoryCatalog from "~/components/DirectoryCatalog";
8+
import type { ProductData } from "~/components/DirectoryCatalog";
99
import type { StarlightPageProps } from "@astrojs/starlight/props";
1010
1111
let products: CollectionEntry<"products">[] = await getCollection(
@@ -37,14 +37,13 @@ let productData: ProductData[] = products
3737
const props = {
3838
frontmatter: {
3939
title: "Docs directory",
40-
description:
41-
"Explore the different areas of our documentation site.",
40+
description: "Explore the different areas of our documentation site.",
4241
template: "splash",
4342
},
4443
hideBreadcrumbs: true,
4544
} as StarlightPageProps;
4645
---
4746

4847
<StarlightPage {...props}>
49-
<ProductCatalog products={productData} client:load />
48+
<DirectoryCatalog products={productData} client:load />
5049
</StarlightPage>

0 commit comments

Comments
 (0)