Advertisement
Shell_Casing

useEffetc

Dec 3rd, 2020
845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. useEffect(() => {
  2.         if(!health) {
  3.             setCRCode('');
  4.             setJiraID('');
  5.             setBasePath('');
  6.         }
  7.     }, []);
  8.  
  9.     useEffect(() => {
  10.         setHiveAction('');
  11.         setAlluxioAction('');
  12.     }, []);
  13.  
  14.     useEffect(() => {
  15.         resetHiveForm();
  16.     }, []);
  17.  
  18.     useEffect(() => {
  19.         setInputs([]);
  20.     }, []);
  21.  
  22.     useEffect(() => {
  23.         setPartitionColsName([]);
  24.     }, []);
  25.  
  26.     useEffect(() => {
  27.         setAutomation('alluxio');
  28.     }, []);
  29.  
  30.     // clear errors
  31.     useEffect(() => {
  32.         dispatch(clearErrorsAction());
  33.     }, []);
  34.  
  35.     // check if authed
  36.     useEffect(() => {
  37.         if(!isAuthenticated) {
  38.             navigate(`/login`);
  39.         }
  40.     }, [isAuthenticated]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement