Skip to content

Commit d6b498d

Browse files
authored
Change links to point to /ecosystem page (#1871)
1 parent 920d45d commit d6b498d

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

.changeset/gold-buses-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@theguild/components": patch
3+
---
4+
5+
Change links to point to /ecosystem page

packages/components/src/components/explore-main-product-cards.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ import { ArrowIcon } from './icons';
66
import { MainProductCard } from './product-card';
77
import { TextLink } from './text-link';
88

9-
export type ExploreMainProductCardsProps = HTMLAttributes<HTMLDivElement>;
9+
export interface ExploreMainProductCardsProps extends HTMLAttributes<HTMLDivElement> {
10+
isHive?: boolean;
11+
}
1012

11-
export function ExploreMainProductCards({ className, ...rest }: ExploreMainProductCardsProps) {
13+
export function ExploreMainProductCards({
14+
className,
15+
isHive,
16+
...rest
17+
}: ExploreMainProductCardsProps) {
1218
return (
1319
<section
1420
className={cn(
@@ -21,8 +27,10 @@ export function ExploreMainProductCards({ className, ...rest }: ExploreMainProdu
2127
<Heading as="h2" size="xs" className="text-pretty">
2228
Explore Hive 360° GraphQL Ecosystem to reach full potential
2329
</Heading>
24-
{/* TODO: Replace with a link to the Libraries page */}
25-
<TextLink href="https://github.com/the-guild-org" className="mt-4 lg:mt-6">
30+
<TextLink
31+
href={isHive ? '/ecosystem' : 'https://the-guild.dev/graphql/hive/ecosystem'}
32+
className="mt-4 lg:mt-6"
33+
>
2634
Learn more
2735
<ArrowIcon />
2836
</TextLink>

packages/components/src/components/hive-navigation/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import {
3636

3737
export * from './graphql-conf-card';
3838

39-
const EXPLORE_HREF = 'https://github.com/the-guild-org';
40-
4139
const ENTERPRISE_MENU_HIDDEN = true;
4240

4341
export interface HiveNavigationProps {
@@ -297,7 +295,9 @@ export const ProductsMenu = React.forwardRef<HTMLDivElement, ProductsMenuProps>(
297295
})}
298296
</ul>
299297
<Anchor
300-
href={EXPLORE_HREF}
298+
href={
299+
productName === 'Hive' ? '/ecosystem' : 'https://the-guild.dev/graphql/hive/ecosystem'
300+
}
301301
className="hive-focus -my-2 ml-2 flex items-center gap-2 rounded-lg p-2 font-medium text-green-800 transition-colors hover:bg-beige-100 hover:text-green-1000 dark:text-neutral-400 dark:hover:bg-neutral-800/50 dark:hover:text-neutral-200"
302302
>
303303
<span>Explore all libraries</span> <ArrowIcon />

packages/components/src/components/tools-and-libraries-cards/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1+
import { HTMLAttributes } from 'react';
12
import { cn } from '../../cn';
23
import { FOUR_MAIN_PRODUCTS, SIX_HIGHLIGHTED_PRODUCTS } from '../../products';
34
import { CallToAction } from '../call-to-action';
45
import { Heading } from '../heading';
56
import { AncillaryProductCard, MainProductCard } from '../product-card';
67

8+
export interface ToolsAndLibrariesCardsProps extends HTMLAttributes<HTMLDivElement> {
9+
isHive?: boolean;
10+
}
711
export function ToolsAndLibrariesCards({
812
className,
913
isHive,
10-
}: {
11-
className?: string;
12-
isHive?: boolean;
13-
}) {
14+
...rest
15+
}: ToolsAndLibrariesCardsProps) {
1416
return (
1517
<section
1618
className={cn(
1719
'isolate flex flex-col gap-6 px-4 py-6 lg:gap-12 lg:py-24 xl:px-[120px]',
1820
className,
1921
)}
22+
{...rest}
2023
>
2124
<Heading as="h2" size="md" className="text-green-1000">
2225
Discover the complete ecosystem of tools and libraries

0 commit comments

Comments
 (0)