-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the Community Directory (#113)
* dmarz requests * metachris feedback + ccr-rs
- Loading branch information
1 parent
1759a6a
commit 198e314
Showing
6 changed files
with
166 additions
and
4 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
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,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 ( | ||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '20px' }}> | ||
{pirates.map((pirate) => ( | ||
<div key={pirate.gh_username} style={{ width: '200px', padding: '10px', boxShadow: '0 2px 4px rgba(0,0,0,0.1)' }}> | ||
<img src={pirate.image} alt={pirate.name} style={{ width: '100px', height: '100px', borderRadius: '50%', display: 'block', marginLeft: 'auto', marginRight: 'auto' }} /> | ||
<h3 style={{ textAlign: 'center' }}>{pirate.name}</h3> | ||
<p style={{ display: 'flex', justifyContent: 'center', gap: '10px' }}> | ||
{pirate.gh_username && ( | ||
<a href={`https://github.com/${pirate.gh_username}`} target="_blank" rel="noopener noreferrer"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z"></path></svg> | ||
</a> | ||
)} | ||
{pirate.x_url && ( | ||
<a href={pirate.x_url} target="_blank" rel="noopener noreferrer"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19.633 7.997c.013.175.013.349.013.523 0 5.325-4.053 11.461-11.46 11.461-2.282 0-4.402-.661-6.186-1.809.324.037.636.05.973.05a8.07 8.07 0 0 0 5.001-1.721 4.036 4.036 0 0 1-3.767-2.793c.249.037.499.062.761.062.361 0 .724-.05 1.061-.137a4.027 4.027 0 0 1-3.23-3.953v-.05c.537.299 1.16.486 1.82.511a4.022 4.022 0 0 1-1.796-3.354c0-.748.199-1.434.548-2.032a11.457 11.457 0 0 0 8.306 4.215c-.062-.3-.1-.611-.1-.923a4.026 4.026 0 0 1 4.028-4.028c1.16 0 2.207.486 2.943 1.272a7.957 7.957 0 0 0 2.556-.973 4.02 4.02 0 0 1-1.771 2.22 8.073 8.073 0 0 0 2.319-.624 8.645 8.645 0 0 1-2.019 2.083z"></path></svg> | ||
</a> | ||
)} | ||
{pirate.website && ( | ||
<a href={pirate.website} target="_blank" rel="noopener noreferrer"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z"></path><path d="M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"></path></svg> | ||
</a> | ||
)} | ||
</p> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default PirateCards; |
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,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/" | ||
} | ||
] | ||
} |
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,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<Topic[]>([]); | ||
const [isLoading, setIsLoading] = useState<boolean>(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 <div>Loading...</div>; | ||
|
||
const baseUrl = 'https://collective.flashbots.net/t/'; | ||
|
||
return ( | ||
<div> | ||
{topics.length > 0 ? ( | ||
<ol> | ||
{topics.map(topic => ( | ||
<li key={topic.id}> | ||
<a href={`${baseUrl}${topic.slug}/${topic.id}`} target="_blank" rel="noopener noreferrer"> | ||
{topic.title} | ||
</a> | ||
</li> | ||
))} | ||
</ol> | ||
) : ( | ||
<p>No topics found.</p> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default RequestsForSuapps; |
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