Currently getting Expected an assignment or function call and instead saw an expression no-unused-expressions
I tried returning an empty div at the end of my ternary operator but still get the same error.
React.useEffect(() => {
if (response && !isLoading) {
showNotification({
variant: "success",
message: `Your invitation ${
name.props ? name.props.children : name
}-${data} was successfully sent.`
});
closeAlert();
viewName === "GetAllData"
? dispatch({
type: "FETCH_DATA",
payload: { loading: true }
})
: dispatch({
type: "FETCH_AVAILABLE_STAFF",
payload: { loading: true }
});
}
return <div />;
}, [response, isLoading]);