diff --git a/pages/applications/[repo].tsx b/pages/applications/[repo].tsx index f11f4a21..33fba94e 100644 --- a/pages/applications/[repo].tsx +++ b/pages/applications/[repo].tsx @@ -165,7 +165,7 @@ export default function App({ globalProps, }: InferGetStaticPropsType) { const router = useRouter() - const tabs = + const recipeTabs = recipes?.filter(isRecipe).map((recipe) => ({ key: recipe.name, label: @@ -211,9 +211,9 @@ export default function App({
Available providers - {!isEmpty(tabs) && ( + {!isEmpty(recipeTabs) ? (
- {tabs.map((provider) => ( + {recipeTabs.map((provider) => ( ))}
+ ) : ( + Coming soon )}
@@ -268,25 +270,27 @@ export default function App({ - {tabs && tabs.length > 0 && ( -
- - Deploying {repo.displayName} is a matter of executing these - 3 commands: - - - plural build - - {`plural deploy --commit "deploying ${repo.name}"`} - -
+ {!isEmpty(recipeTabs) && ( + <> +
+ + Deploying {repo.displayName} is a matter of executing + these 3 commands: + + + plural build + + {`plural deploy --commit "deploying ${repo.name}"`} + +
{' '} + + Read the install documentation + + )} - - Read the install documentation -
{repo?.readme && ( diff --git a/pages/solutions/[solution].tsx b/pages/solutions/[solution].tsx index ae5acdc7..33345464 100644 --- a/pages/solutions/[solution].tsx +++ b/pages/solutions/[solution].tsx @@ -136,9 +136,11 @@ export default function Solution({ > {solution.bullet_points.map( - (bullet) => + (bullet, i) => bullet?.content && ( - {bullet.content} + + {bullet.content} + ) )} diff --git a/src/components/RepoSocials.tsx b/src/components/RepoSocials.tsx index 6defc132..604b35f0 100644 --- a/src/components/RepoSocials.tsx +++ b/src/components/RepoSocials.tsx @@ -6,6 +6,8 @@ import { GitHubIcon, } from '@pluralsh/design-system' +import { isEmpty } from 'lodash-es' + import { type BasicRepo, type FullRepo } from '@src/data/getRepos' export function RepoSocials({ @@ -55,15 +57,17 @@ export function RepoSocials({ License )} - + {!isEmpty(repo.recipes) && ( + + )} ) } diff --git a/src/data/getRepos.tsx b/src/data/getRepos.tsx index d1d9611d..fe24669e 100644 --- a/src/data/getRepos.tsx +++ b/src/data/getRepos.tsx @@ -23,6 +23,7 @@ import { } from '../generated/graphqlPlural' const REMOVE_LIST = ['bootstrap', 'test-harness', 'gcp-config-connector'] +const ALLOW_LIST = ['kubeflow'] export type BasicRepo = ReturnType< typeof normalizeRepo> @@ -83,6 +84,10 @@ function inRemoveList(repoName?: string) { return !!REMOVE_LIST.find((name) => name === repoName) } +function inAllowList(repoName?: string) { + return !!ALLOW_LIST.find((name) => name === repoName) +} + export function normalizeRepo< T extends SetOptional> >(repo: T) { @@ -121,7 +126,11 @@ export function normalizeTinyRepo(repo: TinyRepoFragment) { function filterRepo< T extends { name?: string; recipes?: any[] | null } | null | undefined >(repo: T): boolean { - return !!repo && !inRemoveList(repo?.name) && !isEmpty(repo?.recipes) + return ( + !!repo && + !inRemoveList(repo?.name) && + (!isEmpty(repo?.recipes) || inAllowList(repo?.name)) + ) } function filterTinyRepo<