|
1 | | -import { |
2 | | - useCallback, |
3 | | - useContext, |
4 | | - useEffect, |
5 | | - useMemo, |
6 | | - useRef, |
7 | | - useState, |
8 | | -} from 'react' |
9 | | -import React from 'react' |
| 1 | +import { useContext, useEffect, useMemo, useRef, useState } from 'react' |
10 | 2 | import * as d3 from 'd3' |
11 | 3 |
|
12 | 4 | import { useConfig } from '@eplant/config' |
@@ -291,7 +283,7 @@ function newickToD3( |
291 | 283 | * @param metadata - Metadata associated with the node |
292 | 284 | * @param isPrimaryGene - Whether this node represents the primary gene being analyzed |
293 | 285 | * @param themeColors - colouring for the metadata to match ePlant |
294 | | - * @param isHighestY - have we hit the node with the highest Y coordinate |
| 286 | + * @param isHighestNode - have we hit the node with the highest Y coordinate |
295 | 287 | */ |
296 | 288 | interface MetadataVisualizationsProps { |
297 | 289 | x: number |
@@ -339,7 +331,7 @@ const calculateDimensions = (leafCount: number = 0) => { |
339 | 331 | * Component for rendering metadata visualizations next to tree nodes |
340 | 332 | * Displays expression similarity and sequence similarity using color-coded bars |
341 | 333 | * |
342 | | - * @param props - Component properties |
| 334 | + * @param MetadataVisualizationsProps - Component properties |
343 | 335 | * @returns JSX element containing metadata visualizations |
344 | 336 | */ |
345 | 337 | const MetadataVisualizations = ({ |
@@ -700,7 +692,6 @@ export const NavigatorViewObject = () => { |
700 | 692 | const { switchViewAndGene } = useViewSwitch() |
701 | 693 | const { userViews } = useConfig() |
702 | 694 | const [speciesList] = useSpecies() |
703 | | - const speciesAPI = speciesList.length ? speciesList[0] : undefined |
704 | 695 |
|
705 | 696 | /** Initialize dimensions with default calculation */ |
706 | 697 | const [dimensions, setDimensions] = useState(calculateDimensions()) |
@@ -755,7 +746,6 @@ export const NavigatorViewObject = () => { |
755 | 746 |
|
756 | 747 | /** Keep track of current gene to detect changes */ |
757 | 748 | const prevGeneRef = useRef<string>(primaryGene) |
758 | | - const prevTreeDataRef = useRef<any>(null) |
759 | 749 |
|
760 | 750 | /** Use the custom hook for data fetching */ |
761 | 751 | const { data: treeData, error, isLoading } = useGeneData(apiUrl) |
|
0 commit comments