Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1x 1x | import { useRecoilValue } from "recoil";
import { packageDataState } from "../../state/atoms";
import type { Package } from "../../types";
function SectionHeader() {
const packageData = useRecoilValue<Package | undefined>(packageDataState);
return (
<section className="p-strip--grey is-shallow">
<div className="u-fixed-width">
<a href="/charms">‹ My charms & bundles</a>
{packageData && (
<h1 className="p-heading--3">
{packageData?.name}{" "}
<small>by {packageData?.publisher?.["display-name"]}</small>
</h1>
)}
</div>
</section>
);
}
export default SectionHeader;
|