composables/useChainRedirect.ts
Showing 4 of 4 total issues
Function getRedirectPathForPrefix
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function getRedirectPathForPrefix({ routeName, chain, route,}: {
- Read upRead up
Function default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function () { const route = useRoute() const router = useRouter() const redirectAfterChainChange = (newChain: Prefix): void => {
- Read upRead up
Avoid too many return
statements within this function. Open
Open
return { params: { prefix: chain, }, query: finalQuery,
Avoid too many return
statements within this function. Open
Open
return { params: { prefix: chain, }, query: route.query,