Skip to content

Commit

Permalink
Merge pull request #194 from storybookjs/cleaning
Browse files Browse the repository at this point in the history
Fix addons tags
  • Loading branch information
cdedreuille authored Jul 15, 2024
2 parents bafbd1c + 6af1ccc commit 67077a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 54 deletions.
16 changes: 6 additions & 10 deletions apps/addon-catalog/app/(home)/tag/[...name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,18 @@ import { notFound } from 'next/navigation';

interface TagDetailsProps {
params: {
name: string;
name: string[];
};
}

// export async function generateStaticParams() {
// const categories = (await fetchTagsData({ isCategory: true })) || [];
// const tags = (await fetchTagsData()) || [];
// return [...categories, ...tags].map((name) => ({
// params: { name },
// }));
// }

export default async function TagDetails({
params: { name },
}: TagDetailsProps) {
const data = (await fetchTagDetailsData(name)) || {};
const tagName = name.join('/');

if (!tagName) return notFound();

const data = (await fetchTagDetailsData(tagName)) || {};

if ('error' in data) return notFound();

Expand Down
43 changes: 0 additions & 43 deletions apps/addon-catalog/app/(home)/tag/[name]/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "storybook-web",
"private": true,
"scripts": {
"build-frontpage": "turbo run build --filter=!./apps/addon-catalog --filter=!./apps/tutorials",
"build-frontpage": "turbo run build --filter=frontpage",
"build-ui-only": "turbo run build --filter=@repo/ui",
"dev": "turbo run dev",
"fetch-docs": "turbo run fetch-docs",
Expand Down

0 comments on commit 67077a4

Please sign in to comment.