Skip to content

Commit

Permalink
Merge pull request #16 from lucasheartcliff/develop
Browse files Browse the repository at this point in the history
fixing lint errors
  • Loading branch information
lucasheartcliff authored May 1, 2024
2 parents 47924ef + 0dd0ec6 commit adee09b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/components/LanguageChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react';
import type { Props as ApexProps } from 'react-apexcharts';
import ReactApexChart from 'react-apexcharts';

import { getContrastColor, secondToHours } from '@/utils';
import { secondToHours } from '@/utils';

interface Props {
data: any;
Expand Down Expand Up @@ -53,7 +53,6 @@ const buildState = (

style: {
fontSize: '16px',
//colors: colors.map(getContrastColor),
},
formatter(value, { seriesIndex, dataPointIndex, w }) {
const barValue = w.globals.series[seriesIndex][dataPointIndex];
Expand Down
7 changes: 5 additions & 2 deletions src/components/Timeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ export default function Timeline({ data }: Props) {
}
function toggleChildNodes(key: string) {
const newClosedNodes = new Set<string>(closedNodes);
const node = nodeMap.get(key);
if (!node) return;

if (!newClosedNodes.has(key)) {
newClosedNodes.add(key);
nodeMap.get(key).open = false;
node.open = false;
} else {
newClosedNodes.delete(key);

nodeMap.get(key).open = true;
node.open = true;
}
setClosedNodes(newClosedNodes);
}
Expand Down

0 comments on commit adee09b

Please sign in to comment.