Ignore:
Timestamp:
02/04/24 16:57:49 (5 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
efaa053
Parents:
07f4e8b
Message:

ouath, mailing impl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Pages/NoBusinessRegisteredError.js

    r07f4e8b r0f5aa27  
    1414  const Auth = useAuth();
    1515  const isLoggedIn = Auth.userIsAuthenticated();
    16   const userId = localStorage.getItem("userId")
     16  const userId = Auth.getUser().userId
    1717  const [registered, setRegistered] = useState(false);
    1818  let checked = false;
     
    2626 
    2727  const { data: firma, isLoading: firmaIsLoading, getData: getFirmi} = useGet("/business/" + userId + "/unapproved", changed)
    28  
     28  const { data, isLoading, getData} = useGet("/" + userId + "/hasBusiness")
     29
    2930
    3031  useEffect(() => {
     
    5253  }
    5354
    54   !firmaIsLoading && firma && firma.length > 0 && firma[0].approved && navigator("/resources/hotel")
     55  !isLoading && data && navigator("/resources/hotel")
    5556 
    5657
Note: See TracChangeset for help on using the changeset viewer.