Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4c9349fce |
@@ -58,7 +58,8 @@ export default function DocPage({
|
|||||||
const [active, setActive] = useState("");
|
const [active, setActive] = useState("");
|
||||||
|
|
||||||
const siblings = docs.filter((d) => d.collection === doc.collection);
|
const siblings = docs.filter((d) => d.collection === doc.collection);
|
||||||
const collectionEntry = collectionEntries(docs).find((c) => c.name === doc.collection)!.entry;
|
// Historical pages remain readable even when their collection is outside the catalog.
|
||||||
|
const collectionEntry = collectionEntries(docs).find((c) => c.name === doc.collection)?.entry ?? doc;
|
||||||
const index = siblings.findIndex((d) => d.slug === doc.slug);
|
const index = siblings.findIndex((d) => d.slug === doc.slug);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
|
|||||||
Reference in New Issue
Block a user