Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
import React from "react";
import { Link } from "./link";
import { Icon } from "./icon";
import { FooterUtilityRow } from "./footer-utility-row";

interface FooterProps {
gitHubEditLink?: string;
lastModified?: string;
}

export const Footer: React.FC<FooterProps> = ({
gitHubEditLink,
lastModified,
}) => {
export const Footer: React.FC<FooterProps> = ({ lastModified }) => {
return (
<footer className="not-prose mt-32 border-t border-muted/70 pt-8 pb-16">
<FooterUtilityRow />
{(gitHubEditLink || lastModified) && (
{lastModified && (
<div className="mt-6 flex flex-wrap items-center gap-x-6 gap-y-3">
{gitHubEditLink && (
<Link
href={gitHubEditLink}
className="inline-flex items-center gap-2 text-sm text-muted-base transition-colors hover:text-muted-high-contrast"
>
<Icon name="Github" className="size-4" />
<span>Edit this page on GitHub</span>
<Icon name="LinkSquare" className="size-4" />
</Link>
)}
{lastModified && (
<span className="text-sm text-muted-base">
Last updated {lastModified}
</span>
)}
<span className="text-sm text-muted-base">
Last updated {lastModified}
</span>
</div>
)}
</footer>
Expand Down
Loading