@propknot/shared-ui 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -339,6 +339,7 @@ var AuthProvider = ({ children }) => {
339
339
  localStorage.removeItem("token");
340
340
  delete api_default.defaults.headers.common["Authorization"];
341
341
  setUser(null);
342
+ setNeedsOnboarding(false);
342
343
  setIsLoading(false);
343
344
  }
344
345
  }, []);
@@ -356,7 +357,7 @@ var AuthProvider = ({ children }) => {
356
357
  }
357
358
  };
358
359
  setUser(normalizedUser);
359
- const isOwnerRole = ["owner", "admin", "super_admin"].includes(normalizedUser.role);
360
+ const isOwnerRole = normalizedUser.role === "owner";
360
361
  const hasNoCompany = !normalizedUser.company;
361
362
  setNeedsOnboarding(isOwnerRole && hasNoCompany);
362
363
  if (normalizedUser.role === "property_manager" || normalizedUser.role === "maintenance") {