From e0090de3291c9d5e069e7b23c444cb364b816ec4 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Tue, 3 Sep 2024 14:24:46 -0700 Subject: [PATCH] Enable cmd/ctrl click open in a new tab. --- components/registry/RegistryCard.tsx | 150 +++++++++++++-------------- 1 file changed, 70 insertions(+), 80 deletions(-) diff --git a/components/registry/RegistryCard.tsx b/components/registry/RegistryCard.tsx index 7a09077..b1ca3a1 100644 --- a/components/registry/RegistryCard.tsx +++ b/components/registry/RegistryCard.tsx @@ -1,5 +1,4 @@ import Link from 'next/link' -import { useRouter } from 'next/router' import React from 'react' import { NodeVersion } from 'src/api/generated' interface RegistryCard { @@ -24,95 +23,86 @@ const RegistryCard: React.FC = ({ image, rating, downloads, - isLoggedIn, }) => { - const router = useRouter() - const handleClick = () => { - if (!isLoggedIn) { - router.push(`/nodes/${id}`) - } - } - return ( -
-
- {image && ( - {`${name}'s - )} -
+ +
+
+ {image && ( + {`${name}'s + )} +
-
-
- {name} -
+
+
+ {name} +
- {latest_version && ( -

- v{latest_version.version} -

- )} -

- {publisherName} -

-
- {downloads != 0 && ( -

- -

- {downloads} -

+ {latest_version && ( +

+ v{latest_version.version}

)} +

+ {publisherName} +

+
+ {downloads != 0 && ( +

+ +

+ {downloads} +

+

+ )} - {rating != 0 && ( -
- + {rating != 0 && ( +
+ -

- {rating} -

-
- )} +

+ {rating} +

+
+ )} +
-
+
) } export default RegistryCard