Skip to content

Commit f181f2d

Browse files
(added) added onHover action to ComponentMap.tsx. Now, when you hover over a Node in the component map on the frontend, it runs the dummy function for onHover
1 parent 5e64300 commit f181f2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/app/components/ComponentMap.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import React, { useEffect, useCallback } from 'react';
88
import * as d3 from 'd3';
9+
import { useStoreContext } from '../store'
10+
import { onHover } from '../actions/actions'
911

1012
interface componentMapProps {
1113
x: number;
@@ -34,6 +36,7 @@ const ComponentMap = (props: componentMapProps) => {
3436
return makeChart(data);
3537
}, [data]);
3638

39+
const [{ tabs, currentTab }, dispatch] = useStoreContext();
3740
const makeChart = useCallback(
3841
(data) => {
3942
// Establish Constants
@@ -146,6 +149,7 @@ const ComponentMap = (props: componentMapProps) => {
146149
//TODO -> Alter incoming snapshots so there is useful data to show on hover.
147150
nodeEnter.on('mouseover', function (d: any, i: number): any {
148151
console.log('mousing over')
152+
dispatch(onHover());
149153
d3.select(this)
150154
.append('text')
151155
.text(() => {

0 commit comments

Comments
 (0)