Skip to content

Conversation

@yoavs8
Copy link
Contributor

@yoavs8 yoavs8 commented Jan 26, 2026

No description provided.

{isAuto && (
<>
<button
className={`bg-${(currentMovement as ScoutingForm["auto"]["movement"]).trenchPass ? "rose-500" : "slate-800"} m-1 w-32 h-16 px-2`}

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe type assertion: type '{ trenchPass: boolean; bumpPass: boolean; } & { bumpStuck: boolean; }' is more narrow than the original type.
onClick={() => {
setMovement({
...currentMovement,
trenchPass: !(currentMovement as ScoutingForm["auto"]["movement"]).trenchPass,

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe type assertion: type '{ trenchPass: boolean; bumpPass: boolean; } & { bumpStuck: boolean; }' is more narrow than the original type.
Pass Trench
</button>
<button
className={`bg-${(currentMovement as ScoutingForm["auto"]["movement"]).bumpPass ? "rose-500" : "slate-800"} m-1 w-32 h-16 px-2`}

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe type assertion: type '{ trenchPass: boolean; bumpPass: boolean; } & { bumpStuck: boolean; }' is more narrow than the original type.
onClick={() => {
setMovement({
...currentMovement,
bumpPass: !(currentMovement as ScoutingForm["auto"]["movement"]).bumpPass,

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe type assertion: type '{ trenchPass: boolean; bumpPass: boolean; } & { bumpStuck: boolean; }' is more narrow than the original type.
Comment on lines +58 to +70
const imageBounds =
containerRatio > mapAspectRatio
? {
width: bound.height * mapAspectRatio,
height: bound.height,
offsetX: (bound.width - bound.height * mapAspectRatio) / HALF_HEIGHT,
offsetY: 0,
}
: {
width: bound.width,
height: bound.width / mapAspectRatio,
offsetX: 0,
offsetY: (bound.height - bound.width / mapAspectRatio) / HALF_HEIGHT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using either css or tailwind to do this on the class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants