feat(portfolio): add hero command deck with canvas signal grid

This commit is contained in:
kbot
2026-07-06 20:34:19 -05:00
parent d332691e7e
commit d4a6819093
2 changed files with 12 additions and 10 deletions

View File

@@ -6,16 +6,16 @@ import { HeroCanvas } from "./HeroCanvas";
const paletteEventName = "blacksite:palette";
export function Hero() {
const shouldReduceMotion = useReducedMotion();
const openCommandPalette = () => {
function openCommandPalette() {
if (typeof window === "undefined") {
return;
}
window.dispatchEvent(new CustomEvent(paletteEventName));
};
}
export function Hero() {
const shouldReduceMotion = useReducedMotion();
return (
<section

View File

@@ -176,8 +176,10 @@ export function HeroCanvas() {
};
resize();
if ("ResizeObserver" in window) {
resizeObserver = new ResizeObserver(resize);
resizeObserver.observe(canvas);
}
window.addEventListener("resize", resize, { passive: true });
if (!shouldReduceMotion) {