diff --git a/Dockerfile b/Dockerfile
index 39db9352c6..c147dee5c1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -90,3 +90,7 @@ COPY --link --from=release /home/app/src/playbook-website/public /home/app/src/p
COPY --link --from=release /home/app/src/node_modules/@powerhome/playbook-icons/icons /home/app/src/temp-icons
RUN cp -r /home/app/src/temp-icons/* /home/app/src/playbook-website/app/javascript/images/
RUN rm -rf /home/app/src/temp-icons
+
+COPY --link --from=release /home/app/src/node_modules/@powerhome/playbook-icons/aliases.json /home/app/src/aliases.json
+RUN cp /home/app/src/aliases.json /home/app/src/playbook-website/app/javascript/aliases.json
+RUN rm /home/app/src/aliases.json
diff --git a/playbook-website/app/controllers/pages_controller.rb b/playbook-website/app/controllers/pages_controller.rb
index b4bf4423b5..4450acdd1b 100755
--- a/playbook-website/app/controllers/pages_controller.rb
+++ b/playbook-website/app/controllers/pages_controller.rb
@@ -240,7 +240,12 @@ def set_category
def kit_categories
@category = params[:category]
- aggregate_kits.find { |item| item["category"] == @category }["components"].map { |component| component["name"] }
+ components = aggregate_kits.find { |item| item["category"] == @category }["components"]
+ filter_kits_by_status(components, status: "beta").map { |component| component["name"] }
+ end
+
+ def filter_kits_by_status(components, status: nil)
+ components.reject { |component| status && component["status"] == status }
end
def set_kit
diff --git a/playbook-website/app/javascript/components/Website/src/components/CategoryTitle/index.tsx b/playbook-website/app/javascript/components/Website/src/components/CategoryTitle/index.tsx
index 056757cac9..e148e7ea52 100644
--- a/playbook-website/app/javascript/components/Website/src/components/CategoryTitle/index.tsx
+++ b/playbook-website/app/javascript/components/Website/src/components/CategoryTitle/index.tsx
@@ -6,13 +6,14 @@ import { linkFormat } from "../../../../../utilities/website_sidebar_helper";
import "./styles.scss";
type CategoryTitleProps = {
- name: string;
+ category: string;
};
-export const CategoryTitle = ({ name }: CategoryTitleProps): React.ReactElement => {
+export const CategoryTitle = ({ category }: CategoryTitleProps): React.ReactElement => {
+
return (
-
+
diff --git a/playbook-website/app/javascript/components/Website/src/hooks/loaders.ts b/playbook-website/app/javascript/components/Website/src/hooks/loaders.ts
index 427e0cf1b4..0c4a25c360 100644
--- a/playbook-website/app/javascript/components/Website/src/hooks/loaders.ts
+++ b/playbook-website/app/javascript/components/Website/src/hooks/loaders.ts
@@ -7,13 +7,14 @@ interface ComponentTypes {
}
interface CategoryTypes {
- name: string;
+ category: string;
description: string;
components: ComponentTypes[];
}
-const sortByName = (a: ComponentTypes, b: ComponentTypes) =>
- a.name.localeCompare(b.name);
+const sortByName = (a: ComponentTypes, b: ComponentTypes): number => {
+ return a.name.localeCompare(b.name);
+}
const sortComponentsByName = (kitCategory: CategoryTypes) => {
kitCategory.components.sort(sortByName);
@@ -22,8 +23,8 @@ const sortComponentsByName = (kitCategory: CategoryTypes) => {
export const ComponentsLoader: () => Promise = async () => {
const response = await fetch("/beta/kits.json");
const data = await response.json();
-
- data.kits.sort(sortByName).forEach(sortComponentsByName);
+
+ data.kits.forEach(sortComponentsByName);
return data;
};
@@ -40,9 +41,9 @@ export const CategoryLoader: (
const response = await fetch("/beta/kits.json");
const { kits } = await response.json();
- const filteredData = kits.filter(
- (kit: ComponentTypes) => kit.name === params.name
- )[0];
+ const filteredData = kits.find(
+ (kit: CategoryTypes) => kit.category === params.category
+ );
filteredData.components.sort(sortByName);
diff --git a/playbook-website/app/javascript/components/Website/src/pages/CategoryShow/index.tsx b/playbook-website/app/javascript/components/Website/src/pages/CategoryShow/index.tsx
index 60debf4886..b41c78fcf1 100644
--- a/playbook-website/app/javascript/components/Website/src/pages/CategoryShow/index.tsx
+++ b/playbook-website/app/javascript/components/Website/src/pages/CategoryShow/index.tsx
@@ -13,13 +13,13 @@ import { Kit } from "../ComponentList"
import "./styles.scss"
export default function CategoryShow() {
- const { components, name, description } = useLoaderData()
+ const { components, category, description } = useLoaderData()
const [kitsToShow, setKitsToShow] = useState(components)
const [platform, setPlatform] = useState('react')
return (
<>
-
+
Components