From 526f2d2c9f6c5ff8867cb0c645326e0a8f7991ae Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 18 Oct 2021 13:16:22 +0200 Subject: adding shoelace --- src/views/Graph.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/views/Graph.js') diff --git a/src/views/Graph.js b/src/views/Graph.js index 0920f76..6b42285 100644 --- a/src/views/Graph.js +++ b/src/views/Graph.js @@ -10,6 +10,7 @@ import Quote from "./Quote.js"; import Credits from "./Credits.js"; import Title from "./Title.js"; import buildGraph from "../graph.js"; +import { footprint } from "../utils/shoelace.js"; export default function Graph({ db }) { const [node, setNode] = useState(null); @@ -46,6 +47,7 @@ export default function Graph({ db }) { const handleClick = useCallback((node) => { setNode(node); setDetailVisible(true); + footprint("details", { id: node.id + 1 }); }); /** Click to close the media modal */ @@ -64,6 +66,13 @@ export default function Graph({ db }) { } }); + const handleCredits = useCallback((newState) => { + if (newState) { + footprint("credits"); + } + setCreditsVisible(newState); + }, []); + return (
@@ -74,7 +83,7 @@ export default function Graph({ db }) { /> -- cgit v1.2.3-70-g09d2