From 198e3147e800feaf4e425418ec6e75efc594073f Mon Sep 17 00:00:00 2001 From: Andy Tudhope <13001517+andytudhope@users.noreply.github.com> Date: Mon, 8 Apr 2024 18:38:11 +0200 Subject: [PATCH] Improve the Community Directory (#113) * dmarz requests * metachris feedback + ccr-rs --- docs/tools/community-directory.mdx | 25 ++++++++++-- docs/tutorials/rigil.mdx | 6 ++- src/components/Pirates/index.tsx | 40 ++++++++++++++++++ src/components/Pirates/pirates.json | 31 ++++++++++++++ src/components/SuappRequest/index.tsx | 59 +++++++++++++++++++++++++++ src/css/custom.css | 9 ++++ 6 files changed, 166 insertions(+), 4 deletions(-) create mode 100644 src/components/Pirates/index.tsx create mode 100644 src/components/Pirates/pirates.json create mode 100644 src/components/SuappRequest/index.tsx diff --git a/docs/tools/community-directory.mdx b/docs/tools/community-directory.mdx index 211a9f16..5ae992bb 100644 --- a/docs/tools/community-directory.mdx +++ b/docs/tools/community-directory.mdx @@ -10,8 +10,19 @@ keywords: - community --- +import PirateCards from '@site/src/components/Pirates'; +import RequestsForSuapps from '@site/src/components/SuappRequest' + # Community Directory +
+ + Add your work to this page + +
+ ## SDKs We provide two well-supported SDKs: @@ -24,7 +35,7 @@ We provide two well-supported SDKs:
TypeScript
-
For web developers
+
Forked from viem
@@ -48,7 +59,7 @@ We provide two well-supported SDKs:
Golang
-
For engineers
+
Forked from Geth
@@ -72,7 +83,7 @@ SUAVE works well with Forge, as our tutorials illustrate. If you need something
SUAVE Ethers
-
For those who prefer Ethers to Viem.
+
For those who prefer Ethers to viem.
@@ -189,4 +200,12 @@ SUAVE works well with Forge, as our tutorials illustrate. If you need something +## Requests for SUAPPs + + + +## SUAVE Pirates + +Join the community of people building on SUAVE by creating your own SUAPP or contributing to any of our repos. + diff --git a/docs/tutorials/rigil.mdx b/docs/tutorials/rigil.mdx index 210adc81..6bacd954 100644 --- a/docs/tutorials/rigil.mdx +++ b/docs/tutorials/rigil.mdx @@ -147,4 +147,8 @@ async function sendCCR() { sendCCR().catch(console.error); ``` -3. Run `node index.js` and check your console for tx hash of your first CCR on Rigil. \ No newline at end of file +3. Run `node index.js` and check your console for tx hash of your first CCR on Rigil. + +### Rust + +There is a [community-maintained repo developing here](https://github.com/halo3mic/ccr-rs) if you'd like to contribute to working on SUAVE using Rust. \ No newline at end of file diff --git a/src/components/Pirates/index.tsx b/src/components/Pirates/index.tsx new file mode 100644 index 00000000..6d03b6f2 --- /dev/null +++ b/src/components/Pirates/index.tsx @@ -0,0 +1,40 @@ +/** + * Copyright (c) Flashbots Ltd. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import piratesData from './pirates.json'; + +const PirateCards = () => { + const pirates = piratesData.pirates; + return ( +
+ {pirates.map((pirate) => ( +
+ {pirate.name} +

{pirate.name}

+

+ {pirate.gh_username && ( + + + + )} + {pirate.x_url && ( + + + + )} + {pirate.website && ( + + + + )} +

+
+ ))} +
+ ); +}; + +export default PirateCards; \ No newline at end of file diff --git a/src/components/Pirates/pirates.json b/src/components/Pirates/pirates.json new file mode 100644 index 00000000..7dea78fe --- /dev/null +++ b/src/components/Pirates/pirates.json @@ -0,0 +1,31 @@ +{ + "pirates": [ + { + "gh_username": "halo3mic", + "name": "Miha Lotric", + "image": "https://avatars.githubusercontent.com/u/46010359?v=4", + "x_url": "https://twitter.com/MihaLotric" + }, + { + "gh_username": "Lilyjjo", + "name": "Lily Johnson", + "image": "https://avatars.githubusercontent.com/u/35852084?v=4", + "x_url": "https://twitter.com/lobstermindset", + "website": "https://lilyaudits.xyz/" + }, + { + "gh_username": "mehranhydary", + "name": "Mehran Hydary", + "image": "https://avatars.githubusercontent.com/u/2007405?v=4", + "x_url": "https://twitter.com/mehranhydary", + "website": "https://mehranhydary.notion.site/Meet-Mehran-cfa92f7793874a409831076a663f5cb9" + }, + { + "gh_username": "lstephanian", + "name": "Lauren Stephanian", + "image": "https://avatars.githubusercontent.com/u/3458687?v=4", + "x_url": "https://twitter.com/lstephanian", + "website": "https://laurenstephanian.com/" + } + ] +} \ No newline at end of file diff --git a/src/components/SuappRequest/index.tsx b/src/components/SuappRequest/index.tsx new file mode 100644 index 00000000..3f4f0c14 --- /dev/null +++ b/src/components/SuappRequest/index.tsx @@ -0,0 +1,59 @@ +/** + * Copyright (c) Flashbots Ltd. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import React, { useState, useEffect } from 'react'; + +interface Topic { + id: number; + title: string; + slug: string; +} + +const RequestsForSuapps: React.FC = () => { + const [topics, setTopics] = useState([]); + const [isLoading, setIsLoading] = useState(true); + + useEffect(() => { + const fetchTopics = async () => { + try { + const response = await fetch('https://collective.flashbots.net/tag/request-for-suapp.json'); + const data = await response.json(); + console.log(data) + setTopics(data.topic_list.topics); + setIsLoading(false); + } catch (error) { + console.error('Error fetching topics:', error); + setIsLoading(false); + } + }; + + fetchTopics(); + }, []); + + if (isLoading) return
Loading...
; + + const baseUrl = 'https://collective.flashbots.net/t/'; + + return ( +
+ {topics.length > 0 ? ( +
    + {topics.map(topic => ( +
  1. + + {topic.title} + +
  2. + ))} +
+ ) : ( +

No topics found.

+ )} +
+ ); +}; + +export default RequestsForSuapps; diff --git a/src/css/custom.css b/src/css/custom.css index e26f404b..1940ad7c 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -286,3 +286,12 @@ footer { [data-theme='dark'] .card { color: #fff; } + +.directory { + padding-top: 16px; +} + +.directory:hover { + text-decoration: none !important; + color: #fff !important; +}