Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminWatts committed Feb 22, 2024
1 parent 0fdf136 commit e5cd473
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions components/gb-live/icons/cables/cable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const Cable: React.FC<CableProps> = ({
from,
to,
width,
cycleSeconds
cycleSeconds,
isExport
}) => {
const { gestureMode } = useContext(MapContext);
const t = useClock();
Expand All @@ -43,10 +44,6 @@ export const Cable: React.FC<CableProps> = ({
return modulusRotationFraction;
});

const isExport = React.useMemo(
() => cycleSeconds !== null && cycleSeconds < 0,
[cycleSeconds]
);
const cx = useDerivedValue(() =>
isExport ? from.x + dims.x * progress.value : to.x - dims.x * progress.value
);
Expand Down
2 changes: 1 addition & 1 deletion components/gb-live/svg-map/foreign-markets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ForeignMarket: React.FC<GbSummaryOutputForeignMarket> = (f) => {
to={foreignPoint}
cycleSeconds={cycleSeconds}
width={width}
isExport={i.ac > 0}
isExport={i.ac < 0}
key={`cable-${i.code}`}
/>
);
Expand Down

0 comments on commit e5cd473

Please sign in to comment.