KiDxS / GateKeeper

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
a year ago2 years old
Expected to return a value at the end of arrow function
 62        }
 63    };
 64    // renderAlert is a function that is used to render alerts if needed.
 65    const renderAlert = () => { 66        if (status.success.current === true) {
 67            return (
 68                <Alert status="success">
Expected to return a value at the end of async arrow function
26
27// Dashboard page
28const Dashboard = () => {
29    const fetchKeypairs = async () => {30        try {
31            const options = { withCredentials: true };
32            const response = await fetchData(
Expected to return a value at the end of arrow function
 34        error: useRef(false),
 35    };
 36
 37    const renderAlert = () => { 38        if (status.success.current === true) {
 39            return (
 40                <Alert status="success">