@@ -75,7 +75,7 @@ function getBestTriplet(sourcePositionArr: Point[], targetPositionArr: Point[],
7575
7676function getBestCombo ( sourcePos : Point | Point [ ] , targetPos : Point | Point [ ] , thirdPos : Point | null ) {
7777 if ( ! Array . isArray ( sourcePos ) && ! Array . isArray ( targetPos ) ) {
78- return [ sourcePos , targetPos , thirdPos ] as Pair < Point > | Triple < Point >
78+ return [ sourcePos , targetPos , thirdPos ] as const
7979 }
8080
8181 const sourcePositionArr = castArray ( sourcePos )
@@ -127,7 +127,7 @@ const Transfers = ({
127127} : Props ) => {
128128 const [ transfersInner , setTransfersInner ] = useState < SVGGElement | null > ( null )
129129
130- const getThirdPosition = useCallback ( ( transfer : Transfer ) => {
130+ const getThirdPosition = ( transfer : Transfer ) => {
131131 const { source, target } = transfer
132132 const scp = stationCircumpoints . get ( source . station )
133133 const includes = scp && scp . includes ( source ) && scp . includes ( target )
@@ -136,15 +136,15 @@ const Transfers = ({
136136 }
137137 const third = difference ( scp , [ source , target ] ) [ 0 ] || undefined
138138 return getPlatformPosition ( third )
139- } , [ stationCircumpoints , getPlatformPosition ] )
139+ }
140140
141- const getPositions = useCallback ( ( transfer : Transfer ) => {
141+ const getPositions = ( transfer : Transfer ) => {
142142 const { source, target } = transfer
143143 const sourcePos = getPlatformSlotPoints ( source )
144144 const targetPos = getPlatformSlotPoints ( target )
145145 const thirdPos = getThirdPosition ( transfer )
146146 return getBestCombo ( sourcePos , targetPos , thirdPos )
147- } , [ getPlatformSlotPoints , getThirdPosition ] )
147+ }
148148
149149 const setFeaturedPlatformsMem = useCallback ( ( transfer : Transfer ) => {
150150 const feat = getFeaturedPlatforms ( transfer )
0 commit comments