-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from adastackio/os_builders
Add new Wallet page, and convert ecosystem directories to table
- Loading branch information
Showing
15 changed files
with
1,986 additions
and
1,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from "react"; | ||
import { Button } from "antd"; | ||
import { SingleCommitIcon } from "../../assets/icons"; | ||
|
||
interface GithubRepoBadgeProps { | ||
repoURL: string; | ||
text?: string; // Optional text prop with default value | ||
} | ||
|
||
const GithubRepoBadge: React.FC<GithubRepoBadgeProps> = React.memo( | ||
({ repoURL, text = "Team" }) => { | ||
if (!repoURL) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<a href={repoURL} target="_blank" rel="noopener noreferrer"> | ||
<div className="badge-container github-repo-badge-container inline-flex items-center"> | ||
<Button | ||
icon={<SingleCommitIcon />} | ||
className="badge-button github-repo-badge-content" | ||
> | ||
{text} | ||
</Button> | ||
</div> | ||
</a> | ||
); | ||
} | ||
); | ||
|
||
// Assign display name to the memoized component | ||
GithubRepoBadge.displayName = "GithubRepoBadge"; | ||
|
||
export default GithubRepoBadge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import React from "react"; | ||
import TeamGithubBadge from "@components/badges/TeamGithubBadge"; | ||
import GithubRepoBadge from "@components/badges/GithubRepoBadge"; | ||
import Favicon from "@components/badges/Favicon"; | ||
|
||
interface Project { | ||
name: string; | ||
website: string; | ||
teamGithubURL?: string; | ||
sourceRepoURL?: string; | ||
description?: string; | ||
} | ||
|
||
interface DirectoryTableProps { | ||
projects: Project[]; | ||
} | ||
|
||
const DirectoryTable: React.FC<DirectoryTableProps> = ({ projects = [] }) => { | ||
// Sort projects by open source status | ||
const sortedProjects = projects.sort((a, b) => { | ||
if (a.sourceRepoURL && !b.sourceRepoURL) return -1; | ||
if (!a.sourceRepoURL && b.sourceRepoURL) return 1; | ||
if (a.teamGithubURL && !b.teamGithubURL) return -1; | ||
if (!a.teamGithubURL && b.teamGithubURL) return 1; | ||
return 0; | ||
}); | ||
|
||
return ( | ||
<div className="data-table-wrapper"> | ||
<table className="data-table directory-table"> | ||
<tbody> | ||
{sortedProjects.map((project, index) => ( | ||
<tr | ||
key={index} | ||
className="nx-m-0 nx-border-t nx-border-gray-300 nx-p-0 dark:nx-border-gray-600 even:nx-bg-gray-100 even:dark:nx-bg-gray-600/20" | ||
> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell first-column-cell"> | ||
<div className="flex items-center justify-between w-full"> | ||
<span className="flex items-center"> | ||
<Favicon url={project.website} /> | ||
| ||
<a href={project.website}> | ||
<span className="team_table_name_container"> | ||
{project.name} | ||
</span> | ||
</a> | ||
</span> | ||
</div> | ||
</td> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell"> | ||
{project.teamGithubURL ? ( | ||
<TeamGithubBadge | ||
teamGithubURL={project.teamGithubURL} | ||
text="Team" | ||
/> | ||
) : ( | ||
"" | ||
)} | ||
</td> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell"> | ||
{project.sourceRepoURL ? ( | ||
<GithubRepoBadge | ||
repoURL={project.sourceRepoURL} | ||
text="Source Code" | ||
/> | ||
) : ( | ||
"" | ||
)} | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DirectoryTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import React from "react"; | ||
import TeamGithubBadge from "@components/badges/TeamGithubBadge"; | ||
import GithubRepoBadge from "@components/badges/GithubRepoBadge"; | ||
import Favicon from "@components/badges/Favicon"; | ||
|
||
interface Wallet { | ||
name: string; | ||
website: string; | ||
teamGithubURL: string; | ||
sourceRepoURL: string; | ||
tags: string[]; | ||
} | ||
|
||
interface WalletsTableProps { | ||
wallets: Wallet[]; | ||
filterBy?: string; | ||
} | ||
|
||
const WalletsTable: React.FC<WalletsTableProps> = ({ wallets, filterBy }) => { | ||
const filteredWallets = filterBy | ||
? wallets.filter((wallet) => wallet.tags.includes(filterBy)) | ||
: wallets; | ||
|
||
// Sort wallets by open source status | ||
const sortedWallets = filteredWallets.sort((a, b) => { | ||
if (a.sourceRepoURL && !b.sourceRepoURL) return -1; | ||
if (!a.sourceRepoURL && b.sourceRepoURL) return 1; | ||
if (a.teamGithubURL && !b.teamGithubURL) return -1; | ||
if (!a.teamGithubURL && b.teamGithubURL) return 1; | ||
return 0; | ||
}); | ||
|
||
return ( | ||
<div className="data-table-wrapper"> | ||
<table className="data-table wallet-table"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{sortedWallets.map((wallet, index) => ( | ||
<tr | ||
key={index} | ||
className="nx-m-0 nx-border-t nx-border-gray-300 nx-p-0 dark:nx-border-gray-600 even:nx-bg-gray-100 even:dark:nx-bg-gray-600/20" | ||
> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell first-column-cell"> | ||
<div className="flex items-center justify-between w-full"> | ||
<span className="flex items-center"> | ||
<Favicon url={wallet.website} /> | ||
| ||
<a href={wallet.website}> | ||
<span className="team_table_name_container"> | ||
{wallet.name} | ||
</span> | ||
</a> | ||
</span> | ||
</div> | ||
</td> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell"> | ||
<TeamGithubBadge | ||
teamGithubURL={wallet.teamGithubURL} | ||
text="Team" | ||
/> | ||
</td> | ||
<td className="nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600 table-cell"> | ||
<GithubRepoBadge | ||
repoURL={wallet.sourceRepoURL} | ||
text="Source Code" | ||
/> | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
); | ||
}; | ||
|
||
export default WalletsTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"name": "CardanoCube", | ||
"website": "https://www.cardanocube.com/cardano-ecosystem-interactive-map", | ||
"teamGithubURL": "", | ||
"sourceRepoURL": "", | ||
"description": "Large collection of Cardano projects" | ||
}, | ||
{ | ||
"name": "Built on Cardano", | ||
"website": "https://builtoncardano.com", | ||
"teamGithubURL": "", | ||
"sourceRepoURL": "", | ||
"description": "Organized map of Cardano projects" | ||
}, | ||
{ | ||
"name": "CardanoSpot Library", | ||
"website": "https://cardanospot.io/project-library/all", | ||
"teamGithubURL": "https://github.com/emurgo", | ||
"sourceRepoURL": "", | ||
"description": "Library of dApps building on Cardano" | ||
}, | ||
{ | ||
"name": "Cardano.org Showcase", | ||
"website": "https://developers.cardano.org/showcase", | ||
"teamGithubURL": "https://github.com/cardano-foundation", | ||
"sourceRepoURL": "https://github.com/cardano-foundation/developer-portal", | ||
"description": "Collection of projects building on Cardano" | ||
}, | ||
{ | ||
"name": "Dapps on Cardano", | ||
"website": "https://dappsoncardano.com", | ||
"teamGithubURL": "https://github.com/Cardano-Fans", | ||
"sourceRepoURL": "", | ||
"description": "Ranking stats for dApps, and links to code audits" | ||
}, | ||
{ | ||
"name": "CardanoDegen Resource Directory", | ||
"website": "https://cardanodegen.shop/cardano-links", | ||
"teamGithubURL": "https://github.com/ensured", | ||
"sourceRepoURL": "https://github.com/ensured/cardano-degen-club", | ||
"description": "Simple links to ecosystem essentials" | ||
}, | ||
{ | ||
"name": "dSociety Real World Projects", | ||
"website": "https://dsociety.io/least-harmful", | ||
"teamGithubURL": "https://github.com/selfdriven-foundation", | ||
"sourceRepoURL": "", | ||
"description": "Projects working towards a least-harmful society using economic identity" | ||
}, | ||
{ | ||
"name": "CardanoLink.net", | ||
"website": "https://www.cardanolink.net/Cardanolink/Eng.html", | ||
"teamGithubURL": "https://github.com/NotMick3", | ||
"sourceRepoURL": "https://github.com/NotMick3/CardanoLink-raw-data", | ||
"description": "Links to dApps, Games, dev tools, and much more" | ||
} | ||
] |
Oops, something went wrong.
f76c5e5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
adastackio – ./
adastackio-adastack-projects.vercel.app
adastackio-git-main-adastack-projects.vercel.app
adastackio1436576985.vercel.app
www.adastack.io
adastack.io