Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Aug 20, 2024
1 parent 4b18709 commit a58ad09
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export type { Props } from './shared';
export type { DOMCustomEvent, Race, Data, WideData } from './lib';
export { loadData, race, generateId, defaultOptions } from './lib';
import type { Options as AllOptions } from './lib';
export type Options = Partial<AllOptions>
export type Options = Partial<AllOptions>;
21 changes: 20 additions & 1 deletion src/lib/d3.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
export type { Axis, ScaleLinear, Timer } from 'd3';
export { axisTop, csv, easeLinear, format, hsl, interpolate, interpolateRound, interval, json, max, scaleLinear, select, selectAll, timeYear, timeMonth, timeDay, tsv, xml } from 'd3';
export {
axisTop,
csv,
easeLinear,
format,
hsl,
interpolate,
interpolateRound,
interval,
json,
max,
scaleLinear,
select,
selectAll,
timeYear,
timeMonth,
timeDay,
tsv,
xml,
} from 'd3';
7 changes: 5 additions & 2 deletions src/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ export default function RacingBars(props: Props & { children?: React.ReactNode }
}
}, [props]);

useEffect(() => () => {
useEffect(
() => () => {
racer?.destroy();
}, []);
},
[],
);

return (
<div ref={containerRef} className={className}>
Expand Down

0 comments on commit a58ad09

Please sign in to comment.