crane-cloud/frontend

View on GitHub
src/utils/usePost.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 1 of 1 total issue

Function usePost has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

const usePost = () => {
const [submitting, setSubmitting] = useState(false);
const [error, setError] = useState<TError>({});
const [success, setSuccess] = useState(false);
const [data, setData] = useState<any>();
Severity: Minor
Found in src/utils/usePost.tsx - About 2 hrs to fix
Category
Status