coronasafe/care_fe

View on GitHub
src/CAREUI/interactive/Zoom.tsx

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 3 of 3 total issues

Function ZoomControls has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const ZoomControls = (props: { disabled?: boolean }) => {
const ctx = useContext(ZoomContext);
 
if (ctx == null) {
throw new Error("Component must be used with ZoomProvider");
Severity: Minor
Found in src/CAREUI/interactive/Zoom.tsx - About 1 hr to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Button
disabled={props.disabled}
variant="ghost"
className="p-2.5 rounded-full"
onClick={ctx.zoomOut}
Severity: Major
Found in src/CAREUI/interactive/Zoom.tsx and 1 other location - About 1 hr to fix
src/CAREUI/interactive/Zoom.tsx on lines 72..79

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Button
disabled={props.disabled}
variant="ghost"
className="p-2.5 rounded-full"
onClick={ctx.zoomIn}
Severity: Major
Found in src/CAREUI/interactive/Zoom.tsx and 1 other location - About 1 hr to fix
src/CAREUI/interactive/Zoom.tsx on lines 83..90
Category
Status