⚡
@@ -198,6 +233,7 @@ function SearchResultCard({ item, staggerIndex }: { item: SearchResultItem; stag
function PartialMatchResults({ items }: { items: SearchResultItem[] }) {
const techniqueResults = items.filter((r) => r.type === "technique_page");
+ const sectionResults = items.filter((r) => r.type === "technique_section");
const momentResults = items.filter((r) => r.type === "key_moment");
return (
@@ -219,6 +255,19 @@ function PartialMatchResults({ items }: { items: SearchResultItem[] }) {
)}
+ {sectionResults.length > 0 && (
+
+
+ Sections ({sectionResults.length})
+
+
+ {sectionResults.map((item, i) => (
+
+ ))}
+
+
+ )}
+
{momentResults.length > 0 && (
diff --git a/frontend/src/pages/TechniquePage.tsx b/frontend/src/pages/TechniquePage.tsx
index 38771cd..570593e 100644
--- a/frontend/src/pages/TechniquePage.tsx
+++ b/frontend/src/pages/TechniquePage.tsx
@@ -171,12 +171,12 @@ export default function TechniquePage() {
};
}, [slug, selectedVersion]);
- // Scroll to key moment if URL has a #km- hash fragment
+ // Scroll to hash fragment after technique loads (key moments, section anchors, etc.)
useEffect(() => {
if (!technique) return;
- const hash = window.location.hash;
- if (hash.startsWith("#km-")) {
- const el = document.getElementById(hash.slice(1));
+ const hash = window.location.hash.slice(1);
+ if (hash) {
+ const el = document.getElementById(hash);
if (el) {
el.scrollIntoView({ behavior: "smooth", block: "start" });
}