fix level links

pull/54/head
Jon Eugster 3 years ago
parent bbe38ddc7c
commit e7842bce82

@ -22,7 +22,7 @@ function LevelIcon({ worldId, levelId, position }) {
const completed = useSelector(selectCompleted(gameId, worldId,levelId)) const completed = useSelector(selectCompleted(gameId, worldId,levelId))
// TODO: relative positioning? // TODO: relative positioning?
return ( return (
<Link to={`/game/${gameId}/${worldId}/level/${levelId}`} key={`/game/${gameId}/world/${worldId}/level/${levelId}`}> <Link to={`/game/${gameId}/world/${worldId}/level/${levelId}`} key={`/game/${gameId}/world/${worldId}/level/${levelId}`}>
<circle fill={completed ? "green" :"#aaa"} cx={position.x + Math.sin(levelId/5) * 9} cy={position.y - Math.cos(levelId/5) * 9} r="0.8" /> <circle fill={completed ? "green" :"#aaa"} cx={position.x + Math.sin(levelId/5) * 9} cy={position.y - Math.cos(levelId/5) * 9} r="0.8" />
</Link> </Link>
) )

Loading…
Cancel
Save