Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
huxulm committed Sep 3, 2024
1 parent dcd787a commit 6d754d3
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/build/Build.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const DownloadCard = ({
const ref = useRef<SVGSVGElement>(null);

useEffect(() => {
if (!selectionRef.current) {
if (width > 0 && height > 0 && !selectionRef.current) {
selectionRef.current = render({
ref,
filteredData,
Expand Down
4 changes: 2 additions & 2 deletions components/css/Css.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const DownloadCard = ({
min(data, (d) => min(d.downloads, (v) => new Date(v.day))),
max(data, (d) => max(d.downloads, (v) => new Date(v.day))),
];
}, [brushSelection]);
}, [data, brushSelection]);

const yDomain = useMemo(() => {
return [
Expand Down Expand Up @@ -138,7 +138,7 @@ const DownloadCard = ({
const ref = useRef<SVGSVGElement>(null);

useEffect(() => {
if (!selectionRef.current) {
if (width > 0 && height > 0 && !selectionRef.current) {
selectionRef.current = render({
ref,
filteredData,
Expand Down
2 changes: 1 addition & 1 deletion components/js/Js.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const DownloadCard = ({
const ref = useRef<SVGSVGElement>(null);

useEffect(() => {
if (!selectionRef.current) {
if (width > 0 && height > 0 && !selectionRef.current) {
selectionRef.current = render({
ref,
filteredData,
Expand Down
2 changes: 1 addition & 1 deletion components/viz/Viz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const DownloadCard = ({
const ref = useRef<SVGSVGElement>(null);

useEffect(() => {
if (!selectionRef.current) {
if (width > 0 && height > 0 && !selectionRef.current) {
selectionRef.current = render({
ref,
filteredData,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.1",
"postcss": "^8.4.41",
"serve": "^14.2.3",
"tailwindcss": "^3.4.10",
"turbo": "^2.1.0",
"typescript": "^5.3.2"
Expand Down
Loading

0 comments on commit 6d754d3

Please sign in to comment.