-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
95 additions
and
5 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,32 @@ | ||
import { Link } from "react-router-dom"; | ||
import "./App.css"; | ||
import { Header } from "./components/Header"; | ||
import * as gsc from "@govsky/config"; | ||
|
||
const { config } = gsc; | ||
|
||
const sortedConfig = Object.entries(config) | ||
.map(([code, { name }]) => ({ code, name })) | ||
.sort((a, b) => (a.name > b.name ? 1 : -1)); | ||
|
||
export const Index = () => { | ||
return ( | ||
<main> | ||
<Header /> | ||
<p className="description"> | ||
Welcome! Govsky is an effort to catalog government presence on Bluesky | ||
by tracking when officially government domains sign up for the service. | ||
</p> | ||
<p className="description"> | ||
Find your country below to see which government entities are on Bluesky. | ||
</p> | ||
<ul className="country-list"> | ||
{sortedConfig.map(({ code, name }) => ( | ||
<li key={code}> | ||
<Link to={`/${code}`}>{name}</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</main> | ||
); | ||
}; |
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,27 @@ | ||
import { Link } from "react-router-dom"; | ||
import gh from "./github-mark.png"; | ||
|
||
type Props = { | ||
countryName?: string; | ||
}; | ||
|
||
export const Header = ({ countryName }: Props) => { | ||
return ( | ||
<> | ||
{countryName && ( | ||
<Link className="back-link" to="/"> | ||
« Back to country list | ||
</Link> | ||
)} | ||
<header> | ||
<h1>Govsky</h1> | ||
{countryName && <span>{countryName}</span>} | ||
<div className="gh-link-container"> | ||
<a className="gh-link" href="https://github.com/nas5w/govsky"> | ||
<img src={gh} alt="GitHub logo"></img> Github | ||
</a> | ||
</div> | ||
</header> | ||
</> | ||
); | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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