From 4972f2ff2d96460268ac4ba25fbceef218b57741 Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Wed, 1 Jun 2022 13:54:58 +0530 Subject: [PATCH] Add elements for crunchbase, github, and funding details --- app/pages/index.tsx | 96 +++++++++++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/app/pages/index.tsx b/app/pages/index.tsx index 2d82748..f5c7cc0 100644 --- a/app/pages/index.tsx +++ b/app/pages/index.tsx @@ -49,7 +49,7 @@ export default function Home({ tools }: { tools: Array }) { } } - const cleanWebsiteUrl = (websiteUrl: string) => { + const cleanUrl = (websiteUrl: string) => { try { return websiteUrl .replace(/\/$/, '') @@ -72,9 +72,11 @@ export default function Home({ tools }: { tools: Array }) {
@@ -87,30 +89,74 @@ export default function Home({ tools }: { tools: Array }) { />

{currentItem.name}

{currentItem.description}

- {cleanWebsiteUrl(currentItem.website) && ( -

- Website:{' '} - - {cleanWebsiteUrl(currentItem.website)} - -

- )} - {extractTwitterUsernameFromUrl(currentItem.twitter) && ( -

- Twitter:{' '} - - {extractTwitterUsernameFromUrl(currentItem.twitter)} - -

- )} +
+
+ {cleanUrl(currentItem.website) && ( +

+ Website{' '} + + {cleanUrl(currentItem.website)} + +

+ )} +
+
+ {extractTwitterUsernameFromUrl(currentItem.twitter) && ( +

+ Twitter{' '} + + {extractTwitterUsernameFromUrl(currentItem.twitter)} + +

+ )} +
+
+ {cleanUrl(currentItem.github) && ( +

+ GitHub{' '} + + {cleanUrl(currentItem.github)} + +

+ )} +
+
+ {cleanUrl(currentItem.crunchbase) && ( +

+ + Crunchbase + {' '} + + {cleanUrl(currentItem.crunchbase)} + +

+ )} +
+
+ {currentItem.funding && ( +

+ Funding{' '} + {currentItem.funding} +

+ )} +
+