1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 16:46:39 -04:00

consistent use of arrow functions/default exports

This commit is contained in:
2022-01-02 15:16:07 -05:00
parent cd5a1b191a
commit ca614e1a1a
34 changed files with 2956 additions and 2985 deletions

View File

@ -10,7 +10,7 @@ type Props = {
children: unknown;
};
export default function Container({ title, description, children }: Props) {
const Container = ({ title, description, children }: Props) => {
const router = useRouter();
return (
@ -27,4 +27,6 @@ export default function Container({ title, description, children }: Props) {
<div className={styles.container}>{children}</div>
</>
);
}
};
export default Container;

View File

@ -4,6 +4,6 @@ type Props = {
children: unknown;
};
export default function Content({ children }: Props) {
return <div className={styles.content}>{children}</div>;
}
const Content = ({ children }: Props) => <div className={styles.content}>{children}</div>;
export default Content;

View File

@ -3,12 +3,12 @@ import Footer from "./page-footer/Footer";
import styles from "./Layout.module.scss";
export default function Layout({ children }) {
return (
const Layout = ({ children }) => (
<>
<Header />
<main className={styles.main}>{children}</main>
<Footer />
</>
);
}
);
export default Layout;

View File

@ -10,7 +10,7 @@ type Props = {
timeout?: number;
};
export default function CopyButton({ content, timeout = 2000 }: Props) {
const CopyButton = ({ content, timeout = 2000 }: Props) => {
const [copied, setCopied] = useState(false);
const handleCopy = (e) => {
@ -54,4 +54,6 @@ export default function CopyButton({ content, timeout = 2000 }: Props) {
)}
</button>
);
}
};
export default CopyButton;

View File

@ -5,7 +5,7 @@ import { SendIcon } from "../icons";
import styles from "./ContactForm.module.scss";
export default function ContactForm() {
const ContactForm = () => {
// status/feedback:
const [status, setStatus] = useState({ success: false, message: "" });
// keep track of fetch:
@ -136,4 +136,6 @@ export default function ContactForm() {
</div>
</form>
);
}
};
export default ContactForm;

View File

@ -2,7 +2,7 @@ import useSWR from "swr";
import { fetcher } from "../../lib/fetcher";
import Loading from "../loading/Loading";
export default function Hits({ slug }) {
const Hits = ({ slug }) => {
// start fetching repos from API immediately
const { data, error } = useSWR(`/api/hits/?slug=${encodeURIComponent(slug)}`, fetcher, {
// avoid double (or more) counting views
@ -25,4 +25,6 @@ export default function Hits({ slug }) {
{data.hits.toLocaleString("en-US")}
</span>
);
}
};
export default Hits;

View File

@ -4,7 +4,7 @@ type Props = {
width: number;
};
export default function Loading({ boxes = 3, timing = 0.1, width }: Props) {
const Loading = ({ boxes = 3, timing = 0.1, width }: Props) => {
// each box is just an empty div
const divs = [];
@ -53,4 +53,6 @@ export default function Loading({ boxes = 3, timing = 0.1, width }: Props) {
`}</style>
</div>
);
}
};
export default Loading;

View File

@ -9,7 +9,7 @@ type NoteProps = {
slug: string;
};
export default function List({ notesByYear }) {
const List = ({ notesByYear }) => {
const sections = [];
Object.entries(notesByYear).forEach(([year, notes]: [string, NoteProps[]]) => {
@ -36,4 +36,6 @@ export default function List({ notesByYear }) {
const reversed = sections.reverse();
return <>{reversed}</>;
}
};
export default List;

View File

@ -13,8 +13,7 @@ export type Props = {
tags?: string[];
};
export default function Meta({ title, date, slug, tags = [] }: Props) {
return (
const Meta = ({ title, date, slug, tags = [] }: Props) => (
<>
<div className={styles.meta}>
<div className={styles.date}>
@ -66,5 +65,6 @@ export default function Meta({ title, date, slug, tags = [] }: Props) {
</Link>
</h1>
</>
);
}
);
export default Meta;

View File

@ -4,8 +4,7 @@ import * as config from "../../lib/config";
import styles from "./Footer.module.scss";
export default function Footer() {
return (
const Footer = () => (
<footer className={styles.footer}>
<div className={styles.row}>
<div className={styles.copyright}>
@ -41,5 +40,6 @@ export default function Footer() {
</div>
</div>
</footer>
);
}
);
export default Footer;

View File

@ -3,13 +3,13 @@ import Menu from "./Menu";
import styles from "./Header.module.scss";
export default function Header() {
return (
const Header = () => (
<header className={styles.header}>
<nav className={styles.nav}>
<Name />
<Menu />
</nav>
</header>
);
}
);
export default Header;

View File

@ -4,7 +4,7 @@ import { HomeIcon, NotesIcon, ProjectsIcon, ContactIcon } from "../icons";
import styles from "./Menu.module.scss";
const menuItems = [
const links = [
{
icon: <HomeIcon className={`icon ${styles.icon}`} />,
text: "Home",
@ -30,14 +30,13 @@ const menuItems = [
// ensure the theme toggle isn't evaluated server-side
const ThemeToggle = dynamic(() => import("./ThemeToggle"), { ssr: false });
export default function Menu() {
return (
const Menu = () => (
<ul className={styles.menu}>
{menuItems.map((item, index) => (
{links.map((link, index) => (
<li key={index} className={styles.item}>
<Link href={item.href} prefetch={false}>
<Link href={link.href} prefetch={false}>
<a className={styles.link}>
{item.icon} <span className={styles.text}>{item.text}</span>
{link.icon} <span className={styles.text}>{link.text}</span>
</a>
</Link>
</li>
@ -46,5 +45,6 @@ export default function Menu() {
<ThemeToggle className={styles.icon} />
</li>
</ul>
);
}
);
export default Menu;

View File

@ -5,8 +5,7 @@ import selfiePic from "../../public/static/images/me.jpg";
import styles from "./Name.module.scss";
export default function Name() {
return (
const Name = () => (
<Link href="/">
<a className={styles.title}>
<span className={styles.selfie}>
@ -23,5 +22,6 @@ export default function Name() {
<span className={styles.name}>Jake Jarvis</span>
</a>
</Link>
);
}
);
export default Name;

View File

@ -6,15 +6,15 @@ import styles from "./ThemeToggle.module.scss";
// store preference in local storage
const storageKey = "dark_mode";
export const getDarkPref = () => localStorage.getItem(storageKey);
export const setDarkPref = (pref: boolean) => localStorage.setItem(storageKey, pref as unknown as string);
const getDarkPref = () => localStorage.getItem(storageKey);
const setDarkPref = (pref: boolean) => localStorage.setItem(storageKey, pref as unknown as string);
// use the `<html data-theme="...">` as a hint to what the theme was set to outside of the button component
// TODO: there's probably (definitely) a cleaner way to do this, maybe with react hooks..?
export const isDark = () => document.documentElement.getAttribute("data-theme") === "dark";
const isDark = () => document.documentElement.getAttribute("data-theme") === "dark";
// sets appropriate `<html data-theme="...">`, `<meta name="color-scheme" ...>`, and color-scheme CSS property
export const updateDOM = (dark: boolean) => {
const updateDOM = (dark: boolean) => {
document.documentElement.setAttribute("data-theme", dark ? "dark" : "light");
document.documentElement.style.colorScheme = dark ? "dark" : "light";
document.head
@ -22,7 +22,7 @@ export const updateDOM = (dark: boolean) => {
?.setAttribute("content", dark ? config.themeColorDark : config.themeColorLight);
};
export default function ThemeToggle({ className = "" }) {
const ThemeToggle = ({ className = "" }) => {
// sync button up with theme and preference states after initialization
const [dark, setDark] = useState(isDark());
const [saved, setSaved] = useState(!!getDarkPref());
@ -66,4 +66,6 @@ export default function ThemeToggle({ className = "" }) {
{dark ? <BulbOffIcon className={`icon ${className}`} /> : <BulbOnIcon className={`icon ${className}`} />}
</button>
);
}
};
export default ThemeToggle;

View File

@ -6,7 +6,7 @@ type Props = {
title: unknown;
};
export default function PageTitle({ title }: Props) {
const PageTitle = ({ title }: Props) => {
const router = useRouter();
return (
@ -14,4 +14,6 @@ export default function PageTitle({ title }: Props) {
<a href={router.asPath}>{title}</a>
</h1>
);
}
};
export default PageTitle;

View File

@ -16,8 +16,7 @@ type Props = {
updatedAt: string;
};
export default function RepoCard({ name, url, description, language, stars, forks, updatedAt }: Props) {
return (
const RepoCard = ({ name, url, description, language, stars, forks, updatedAt }: Props) => (
<div className={styles.card}>
<a className={styles.name} href={url} target="_blank" rel="noopener noreferrer">
{name}
@ -88,5 +87,6 @@ export default function RepoCard({ name, url, description, language, stars, fork
</div>
</div>
</div>
);
}
);
export default RepoCard;

View File

@ -3,10 +3,10 @@ import type { ReactPlayerProps } from "react-player";
import styles from "./FullPageVideo.module.scss";
export default function FullPageVideo(props: ReactPlayerProps) {
return (
const FullPageVideo = (props: ReactPlayerProps) => (
<div className={styles.wrapper}>
<ReactPlayer className={styles.react_player} width="100%" height="100%" {...props} />
</div>
);
}
);
export default FullPageVideo;

View File

@ -18,7 +18,7 @@ import "../styles/typography.scss";
import "../styles/highlight.scss";
import "../styles/index.scss";
export default function App({ Component, pageProps }: AppProps) {
const App = ({ Component, pageProps }: AppProps) => {
const router = useRouter();
useEffect(() => {
@ -202,4 +202,6 @@ export default function App({ Component, pageProps }: AppProps) {
<Component {...pageProps} />
</>
);
}
};
export default App;

View File

@ -7,9 +7,7 @@ import { TapeIcon } from "../components/icons";
import thumbnail from "../public/static/images/birthday/thumb.png";
export default function Birthday() {
return (
<>
const Birthday = () => (
<Layout>
<Container
title="🎉 Cranky Birthday Boy on VHS Tape 📼"
@ -44,6 +42,6 @@ export default function Birthday() {
</Content>
</Container>
</Layout>
</>
);
}
);
export default Birthday;

View File

@ -7,13 +7,9 @@ import { BotIcon } from "../components/icons";
import cliImg from "../public/static/images/cli/screenshot.png";
export default function CLI() {
return (
const CLI = () => (
<Layout>
<Container
title="CLI"
description="AKA, the most useless Node module ever published, in history, by anyone, ever."
>
<Container title="CLI" description="AKA, the most useless Node module ever published, in history, by anyone, ever.">
<PageTitle
title={
<>
@ -90,5 +86,6 @@ export default function CLI() {
</Content>
</Container>
</Layout>
);
}
);
export default CLI;

View File

@ -4,8 +4,7 @@ import PageTitle from "../components/page/PageTitle";
import ContactForm from "../components/contact/ContactForm";
import { MailIcon, LockIcon } from "../components/icons";
export default function Contact() {
return (
const Contact = () => (
<Layout>
<Container title="Contact Me">
<PageTitle
@ -55,5 +54,6 @@ export default function Contact() {
`}</style>
</Container>
</Layout>
);
}
);
export default Contact;

View File

@ -2,6 +2,8 @@ import { getAllNotes } from "../lib/parse-notes";
import { buildFeed } from "../lib/build-feed";
import type { GetServerSideProps } from "next";
const AtomPage = () => null;
export const getServerSideProps: GetServerSideProps = async (context) => {
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
const feed = buildFeed(notes);
@ -16,6 +18,4 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
};
};
const AtomPage = () => null;
export default AtomPage;

View File

@ -2,6 +2,8 @@ import { getAllNotes } from "../lib/parse-notes";
import { buildFeed } from "../lib/build-feed";
import type { GetServerSideProps } from "next";
const RssPage = () => null;
export const getServerSideProps: GetServerSideProps = async (context) => {
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
const feed = buildFeed(notes);
@ -16,6 +18,4 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
};
};
const RssPage = () => null;
export default RssPage;

View File

@ -6,9 +6,7 @@ import Video from "../components/video/FullPageVideo";
import thumbnail from "../public/static/images/hillary/thumb.png";
export default function Hillary() {
return (
<>
const Hillary = () => (
<Layout>
<Container
title="My Brief Apperance in Hillary Clinton's DNC Video"
@ -74,6 +72,6 @@ export default function Hillary() {
</Content>
</Container>
</Layout>
</>
);
}
);
export default Hillary;

View File

@ -39,8 +39,7 @@ const ColorLink = ({ children, href, lightColor, darkColor, title, external = fa
);
};
export default function Index() {
return (
const Index = () => (
<Layout>
<Container>
<h1>
@ -114,12 +113,7 @@ export default function Index() {
Ruby
</ColorLink>
, and{" "}
<ColorLink
href="https://golang.org/"
title="Golang Official Website"
lightColor="#00acd7"
darkColor="#2ad1fb"
>
<ColorLink href="https://golang.org/" title="Golang Official Website" lightColor="#00acd7" darkColor="#2ad1fb">
Go
</ColorLink>{" "}
too.
@ -145,12 +139,7 @@ export default function Index() {
serverless stacks
</ColorLink>
, and{" "}
<ColorLink
href="https://xkcd.com/1319/"
title='"Automation" on xkcd'
lightColor="#ff6200"
darkColor="#f46c16"
>
<ColorLink href="https://xkcd.com/1319/" title='"Automation" on xkcd' lightColor="#ff6200" darkColor="#f46c16">
DevOps automation
</ColorLink>
.
@ -274,13 +263,7 @@ export default function Index() {
email
</ColorLink>{" "}
<sup className="monospace pgp_key">
<ColorLink
href="/pubkey.asc"
title="My Public Key"
lightColor="#757575"
darkColor="#959595"
external={true}
>
<ColorLink href="/pubkey.asc" title="My Public Key" lightColor="#757575" darkColor="#959595" external={true}>
<LockIcon className="icon" /> 2B0C 9CF2 51E6 9A39
</ColorLink>
</sup>
@ -396,5 +379,6 @@ export default function Index() {
`}</style>
</Container>
</Layout>
);
}
);
export default Index;

View File

@ -6,8 +6,7 @@ import Video from "../components/video/FullPageVideo";
import thumbnail from "../public/static/images/leo/thumb.png";
export default function Leo() {
return (
const Leo = () => (
<>
<Layout>
<Container
@ -75,5 +74,6 @@ export default function Leo() {
</Container>
</Layout>
</>
);
}
);
export default Leo;

View File

@ -4,8 +4,7 @@ import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import { LicenseIcon } from "../components/icons";
export default function License() {
return (
const License = () => (
<Layout>
<Container title="License">
<PageTitle
@ -21,8 +20,8 @@ export default function License() {
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener noreferrer">
<strong>Creative Commons Attribution 4.0 International Public License</strong>
</a>{" "}
(CC-BY-4.0), which means that you can copy, redistribute, remix, transform, and build upon the content for
any purpose as long as you give appropriate credit (such as a hyperlink to the original URL).
(CC-BY-4.0), which means that you can copy, redistribute, remix, transform, and build upon the content for any
purpose as long as you give appropriate credit (such as a hyperlink to the original URL).
</p>
<p>
The{" "}
@ -65,21 +64,21 @@ export default function License() {
<blockquote>
<p>
<em>
Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services
or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related information available on an "as-is"
basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons disclaims all liability for damages
resulting from their use to the fullest extent possible.
Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or
legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other
relationship. Creative Commons makes its licenses and related information available on an "as-is" basis.
Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and
conditions, or any related information. Creative Commons disclaims all liability for damages resulting
from their use to the fullest extent possible.
</em>
</p>
</blockquote>
<h3>Using Creative Commons Public Licenses</h3>
<p>
Creative Commons public licenses provide a standard set of terms and conditions that creators and other
rights holders may use to share original works of authorship and other material subject to copyright and
certain other rights specified in the public license below. The following considerations are for
informational purposes only, are not exhaustive, and do not form part of our licenses.
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights
holders may use to share original works of authorship and other material subject to copyright and certain
other rights specified in the public license below. The following considerations are for informational
purposes only, are not exhaustive, and do not form part of our licenses.
</p>
<ul>
<li>
@ -89,8 +88,8 @@ export default function License() {
certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and
conditions of the license they choose before applying it. Licensors should also secure all rights
necessary before applying our licenses so that the public can reuse the material as expected. Licensors
should clearly mark any material not subject to the license. This includes other CC-licensed material,
or material used under an exception or limitation to copyright.{" "}
should clearly mark any material not subject to the license. This includes other CC-licensed material, or
material used under an exception or limitation to copyright.{" "}
<a
href="https://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors"
target="_blank"
@ -103,15 +102,14 @@ export default function License() {
</li>
<li>
<p>
<strong>Considerations for the public:</strong> By using one of our public licenses, a licensor grants
the public permission to use the licensed material under specified terms and conditions. If the
licensor's permission is not necessary for any reasonfor example, because of any applicable exception
or limitation to copyrightthen that use is not regulated by the license. Our licenses grant only
permissions under copyright and certain other rights that a licensor has authority to grant. Use of the
licensed material may still be restricted for other reasons, including because others have copyright or
other rights in the material. A licensor may make special requests, such as asking that all changes be
marked or described. Although not required by our licenses, you are encouraged to respect those requests
where reasonable.{" "}
<strong>Considerations for the public:</strong> By using one of our public licenses, a licensor grants the
public permission to use the licensed material under specified terms and conditions. If the licensor's
permission is not necessary for any reasonfor example, because of any applicable exception or limitation
to copyrightthen that use is not regulated by the license. Our licenses grant only permissions under
copyright and certain other rights that a licensor has authority to grant. Use of the licensed material
may still be restricted for other reasons, including because others have copyright or other rights in the
material. A licensor may make special requests, such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to respect those requests where reasonable.{" "}
<a
href="https://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees"
target="_blank"
@ -129,27 +127,27 @@ export default function License() {
conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the Licensed Material available under these
terms and conditions.
consideration of benefits the Licensor receives from making the Licensed Material available under these terms
and conditions.
</p>
<h3>Section 1 Definitions.</h3>
<p>
a. <strong>Adapted Material</strong> means material subject to Copyright and Similar Rights that is derived
from or based upon the Licensed Material and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and
Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a
musical work, performance, or sound recording, Adapted Material is always produced where the Licensed
Material is synched in timed relation with a moving image.
from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged,
transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights
held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work,
performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in
timed relation with a moving image.
</p>
<p>
b. <strong>Adapter's License</strong> means the license You apply to Your Copyright and Similar Rights in
Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
b. <strong>Adapter's License</strong> means the license You apply to Your Copyright and Similar Rights in Your
contributions to Adapted Material in accordance with the terms and conditions of this Public License.
</p>
<p>
c. <strong>Copyright and Similar Rights</strong> means copyright and/or similar rights closely related to
copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License,
the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
</p>
<p>
d. <strong>Effective Technological Measures</strong> means those measures that, in the absence of proper
@ -170,15 +168,13 @@ export default function License() {
Licensed Material and that the Licensor has authority to license.
</p>
<p>
h. <strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public
License.
h. <strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public License.
</p>
<p>
i. <strong>Share</strong> means to provide material to the public by any means or process that requires
permission under the Licensed Rights, such as reproduction, public display, public performance,
distribution, dissemination, communication, or importation, and to make material available to the public
including in ways that members of the public may access the material from a place and at a time individually
chosen by them.
permission under the Licensed Rights, such as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material available to the public including in ways
that members of the public may access the material from a place and at a time individually chosen by them.
</p>
<p>
j. <strong>Sui Generis Database Rights</strong> means rights other than copyright resulting from Directive
@ -200,17 +196,17 @@ export default function License() {
<li>
<p>
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide,
royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in
the Licensed Material to:
royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the
Licensed Material to:
</p>
<p>A. reproduce and Share the Licensed Material, in whole or in part; and</p>
<p>B. produce, reproduce, and Share Adapted Material.</p>
</li>
<li>
<p>
<strong>Exceptions and Limitations.</strong> For the avoidance of doubt, where Exceptions and
Limitations apply to Your use, this Public License does not apply, and You do not need to comply with
its terms and conditions.
<strong>Exceptions and Limitations.</strong> For the avoidance of doubt, where Exceptions and Limitations
apply to Your use, this Public License does not apply, and You do not need to comply with its terms and
conditions.
</p>
</li>
<li>
@ -221,12 +217,12 @@ export default function License() {
<li>
<p>
<strong>Media and formats; technical modifications allowed.</strong> The Licensor authorizes You to
exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to
make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any
right or authority to forbid You from making technical modifications necessary to exercise the Licensed
Rights, including technical modifications necessary to circumvent Effective Technological Measures. For
purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never
produces Adapted Material.
exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make
technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications necessary to exercise the Licensed Rights,
including technical modifications necessary to circumvent Effective Technological Measures. For purposes
of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces
Adapted Material.
</p>
</li>
<li>
@ -234,9 +230,9 @@ export default function License() {
<strong>Downstream recipients.</strong>
</p>
<p>
A. <strong>Offer from the Licensor Licensed Material.</strong> Every recipient of the Licensed
Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the
terms and conditions of this Public License.
A. <strong>Offer from the Licensor Licensed Material.</strong> Every recipient of the Licensed Material
automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and
conditions of this Public License.
</p>
<p>
B. <strong>No downstream restrictions.</strong> You may not offer or impose any additional or different
@ -247,9 +243,9 @@ export default function License() {
<li>
<p>
<strong>No endorsement.</strong> Nothing in this Public License constitutes or may be construed as
permission to assert or imply that You are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to
receive attribution as provided in Section 3(a)(1)(A)(i).
permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with,
or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive
attribution as provided in Section 3(a)(1)(A)(i).
</p>
</li>
</ol>
@ -263,9 +259,9 @@ export default function License() {
<li>
<p>
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are
publicity, privacy, and/or other similar personality rights; however, to the extent possible, the
Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent
necessary to allow You to exercise the Licensed Rights, but not otherwise.
publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor
waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to
allow You to exercise the Licensed Rights, but not otherwise.
</p>
</li>
<li>
@ -275,8 +271,8 @@ export default function License() {
<p>
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of
the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable
statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right
to collect such royalties.
statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to
collect such royalties.
</p>
</li>
</ol>
@ -301,8 +297,8 @@ export default function License() {
<p>iv. a notice that refers to the disclaimer of warranties;</p>
<p>v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;</p>
<p>
B. indicate if You modified the Licensed Material and retain an indication of any previous
modifications; and
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications;
and
</p>
<p>
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the
@ -311,28 +307,27 @@ export default function License() {
</li>
<li>
<p>
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means,
and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and
context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the
conditions by providing a URI or hyperlink to a resource that includes the required information.
</p>
</li>
<li>
<p>
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to
the extent reasonably practicable.
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the
extent reasonably practicable.
</p>
</li>
<li>
<p>
If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients
of the Adapted Material from complying with this Public License.
If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of
the Adapted Material from complying with this Public License.
</p>
</li>
</ol>
<h3>Section 4 Sui Generis Database Rights.</h3>
<p>
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed
Material:
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
</p>
<p>
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share
@ -348,20 +343,19 @@ export default function License() {
contents of the database.
</p>
<p>
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this
Public License where the Licensed Rights include other Copyright and Similar Rights.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public
License where the Licensed Rights include other Copyright and Similar Rights.
</p>
<h3>Section 5 Disclaimer of Warranties and Limitation of Liability.</h3>
<p>
a.{" "}
<strong>
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the
Licensed Material as-is and as-available, and makes no representations or warranties of any kind
concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without
limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known
or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may
not apply to You.
Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning
the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent
or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable.
Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
</strong>
</p>
<p>
@ -369,10 +363,10 @@ export default function License() {
<strong>
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including,
without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential,
punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or
use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses,
costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this
limitation may not apply to You.
punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use
of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs,
expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may
not apply to You.
</strong>
</p>
<p>
@ -381,16 +375,15 @@ export default function License() {
</p>
<h3>Section 6 Term and Termination.</h3>
<p>
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if
You fail to comply with this Public License, then Your rights under this Public License terminate
automatically.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You
fail to comply with this Public License, then Your rights under this Public License terminate automatically.
</p>
<p>b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:</p>
<ol>
<li>
<p>
automatically as of the date the violation is cured, provided it is cured within 30 days of Your
discovery of the violation; or
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery
of the violation; or
</p>
</li>
<li>
@ -398,8 +391,8 @@ export default function License() {
</li>
</ol>
<p>
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek
remedies for Your violations of this Public License.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies
for Your violations of this Public License.
</p>
<p>
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or
@ -439,8 +432,8 @@ export default function License() {
</p>
<blockquote>
<p>
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to
apply one of its public licenses to material it publishes and in those instances will be considered the
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply
one of its public licenses to material it publishes and in those instances will be considered the
"Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the{" "}
<a
href="https://creativecommons.org/publicdomain/zero/1.0/legalcode"
@ -454,11 +447,11 @@ export default function License() {
<a href="https://creativecommons.org/policies" target="_blank" rel="noopener noreferrer">
creativecommons.org/policies
</a>
, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark
or logo of Creative Commons without its prior written consent including, without limitation, in connection
with any unauthorized modifications to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this
paragraph does not form part of the public licenses.
, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or
logo of Creative Commons without its prior written consent including, without limitation, in connection with
any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or
agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form
part of the public licenses.
</p>
<p>
Creative Commons may be contacted at{" "}
@ -471,5 +464,6 @@ export default function License() {
</Content>
</Container>
</Layout>
);
}
);
export default License;

View File

@ -19,8 +19,7 @@ import rehypeExternalLinks from "rehype-external-links";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
export default function Page({ source, frontMatter, slug }) {
return (
const Note = ({ source, frontMatter, slug }) => (
<>
<NextSeo
title={frontMatter.title}
@ -65,8 +64,7 @@ export default function Page({ source, frontMatter, slug }) {
</Container>
</Layout>
</>
);
}
);
export const getStaticProps: GetStaticProps = async ({ params }) => {
const filePath = path.join(NOTES_PATH, `${params.slug}.mdx`);
@ -111,3 +109,5 @@ export const getStaticPaths: GetStaticPaths = async () => {
fallback: false,
};
};
export default Note;

View File

@ -6,17 +6,13 @@ import List from "../../components/notes/List";
import { getAllNotes } from "../../lib/parse-notes";
import type { GetStaticProps } from "next";
export default function Notes({ notesByYear }) {
return (
<>
const Notes = ({ notesByYear }) => (
<Layout>
<Container title="Notes" description="Recent posts by Jake Jarvis.">
<List notesByYear={notesByYear} />
</Container>
</Layout>
</>
);
}
);
export const getStaticProps: GetStaticProps = async () => {
const allNotes = getAllNotes(["date", "slug", "title"]);
@ -30,3 +26,5 @@ export const getStaticProps: GetStaticProps = async () => {
},
};
};
export default Notes;

View File

@ -21,8 +21,7 @@ import img_2009_07 from "../public/static/images/previously/2009_07.png";
import img_2012_09 from "../public/static/images/previously/2012_09.png";
import img_2018_04 from "../public/static/images/previously/2018_04.png";
export default function Previously() {
return (
const Previously = () => (
<>
<Layout>
<Container
@ -245,5 +244,6 @@ export default function Previously() {
}
`}</style>
</>
);
}
);
export default Previously;

View File

@ -8,8 +8,7 @@ import { PrivacyIcon } from "../components/icons";
import faunaImg from "../public/static/images/privacy/fauna_hits.png";
export default function Privacy() {
return (
const Privacy = () => (
<Layout>
<Container title="Privacy">
<PageTitle
@ -216,5 +215,6 @@ export default function Privacy() {
</Content>
</Container>
</Layout>
);
}
);
export default Privacy;

View File

@ -6,8 +6,7 @@ import RepoCard from "../components/projects/RepoCard";
import { ProjectsIcon } from "../components/icons";
import type { GetStaticProps } from "next";
export default function Projects({ repos }) {
return (
const Projects = ({ repos }) => (
<Layout>
<Container title="Projects">
<PageTitle
@ -55,8 +54,7 @@ export default function Projects({ repos }) {
</p>
</Container>
</Layout>
);
}
);
export const getStaticProps: GetStaticProps = async () => {
// https://docs.github.com/en/graphql/reference/objects#repository
@ -119,3 +117,5 @@ export const getStaticProps: GetStaticProps = async () => {
revalidate: 600,
};
};
export default Projects;

View File

@ -8,8 +8,7 @@ import { LaptopIcon } from "../components/icons";
import desktopImg from "../public/static/images/uses/bigsur.png";
export default function Uses() {
return (
const Uses = () => (
<Layout>
<Container title="/uses" description="Things I use daily.">
<PageTitle
@ -249,11 +248,7 @@ export default function Uses() {
</a>
</li>
<li>
<a
href="https://github.com/adobe-fonts/source-code-pro"
target="_blank"
rel="noopener noreferrer"
>
<a href="https://github.com/adobe-fonts/source-code-pro" target="_blank" rel="noopener noreferrer">
Source Code Pro font
</a>
</li>
@ -656,11 +651,7 @@ export default function Uses() {
</ul>
</li>
<li>
<a
href="https://www.google.com/chrome/browser/?extra=devchannel"
target="_blank"
rel="noopener noreferrer"
>
<a href="https://www.google.com/chrome/browser/?extra=devchannel" target="_blank" rel="noopener noreferrer">
<strong>Google Chrome</strong>
</a>{" "}
😈
@ -1095,5 +1086,6 @@ export default function Uses() {
</Content>
</Container>
</Layout>
);
}
);
export default Uses;

View File

@ -1525,9 +1525,9 @@
integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==
"@types/node@*":
version "17.0.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.5.tgz#57ca67ec4e57ad9e4ef5a6bab48a15387a1c83e0"
integrity sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw==
version "17.0.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.6.tgz#cc1589c9ee853b389e67e8fb4384e0f250a139b9"
integrity sha512-+XBAjfZmmivILUzO0HwBJoYkAyyySSLg5KCGBDFLomJo0sV6szvVLAf4ANZZ0pfWzgEds5KmGLG9D5hfEqOhaA==
"@types/normalize-package-data@^2.4.0":
version "2.4.1"
@ -1999,14 +1999,14 @@ camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
camelcase@^6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.1.tgz#250fd350cfd555d0d2160b1d51510eaf8326e86e"
integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==
version "6.3.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001294:
version "1.0.30001294"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001294.tgz#4849f27b101fd59ddee3751598c663801032533d"
integrity sha512-LiMlrs1nSKZ8qkNhpUf5KD0Al1KCBE3zaT7OLOwEkagXMEDij98SiOovn9wxVGQpklk9vVC/pUSqgYmkmKOS8g==
version "1.0.30001295"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001295.tgz#68a60f8f0664f342b2835c5d8898b4faea7b3d51"
integrity sha512-lSP16vcyC0FEy0R4ECc9duSPoKoZy+YkpGkue9G4D81OfPnliopaZrU10+qtPdT8PbGXad/PNx43TIQrOmJZSQ==
ccount@^1.0.0:
version "1.1.0"
@ -2201,17 +2201,17 @@ copy-to-clipboard@^3.3.1:
toggle-selection "^1.0.6"
core-js-compat@^3.18.0, core-js-compat@^3.19.1:
version "3.20.1"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.20.1.tgz#96917b4db634fbbbc7b36575b2e8fcbf7e4f9691"
integrity sha512-AVhKZNpqMV3Jz8hU0YEXXE06qoxtQGsAqU0u1neUngz5IusDJRX/ZJ6t3i7mS7QxNyEONbCo14GprkBrxPlTZA==
version "3.20.2"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.20.2.tgz#d1ff6936c7330959b46b2e08b122a8b14e26140b"
integrity sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg==
dependencies:
browserslist "^4.19.1"
semver "7.0.0"
core-js-pure@^3.19.0:
version "3.20.1"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.20.1.tgz#f7a2c62f98de83e4da8fca7b78846d3a2f542145"
integrity sha512-yeNNr3L9cEBwNy6vhhIJ0nko7fE7uFO6PgawcacGt2VWep4WqQx0RiqlkgSP7kqUMC1IKdfO9qPeWXcUheHLVQ==
version "3.20.2"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.20.2.tgz#5d263565f0e34ceeeccdc4422fae3e84ca6b8c0f"
integrity sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==
cosmiconfig@^7.0.1:
version "7.0.1"
@ -2587,13 +2587,12 @@ eslint-import-resolver-typescript@^2.4.0:
tsconfig-paths "^3.9.0"
eslint-module-utils@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c"
integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==
version "2.7.2"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129"
integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==
dependencies:
debug "^3.2.7"
find-up "^2.1.0"
pkg-dir "^2.0.0"
eslint-plugin-import@^2.25.2:
version "2.25.3"
@ -4458,9 +4457,9 @@ picocolors@^1.0.0:
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
pidtree@^0.3.0:
version "0.3.1"
@ -4472,13 +4471,6 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
pkg-dir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
dependencies:
find-up "^2.1.0"
pkg-dir@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760"