@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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -274,6 +274,7 @@ var AuthProvider = ({ children }) => {
|
|
|
274
274
|
localStorage.removeItem("token");
|
|
275
275
|
delete api_default.defaults.headers.common["Authorization"];
|
|
276
276
|
setUser(null);
|
|
277
|
+
setNeedsOnboarding(false);
|
|
277
278
|
setIsLoading(false);
|
|
278
279
|
}
|
|
279
280
|
}, []);
|
|
@@ -291,7 +292,7 @@ var AuthProvider = ({ children }) => {
|
|
|
291
292
|
}
|
|
292
293
|
};
|
|
293
294
|
setUser(normalizedUser);
|
|
294
|
-
const isOwnerRole =
|
|
295
|
+
const isOwnerRole = normalizedUser.role === "owner";
|
|
295
296
|
const hasNoCompany = !normalizedUser.company;
|
|
296
297
|
setNeedsOnboarding(isOwnerRole && hasNoCompany);
|
|
297
298
|
if (normalizedUser.role === "property_manager" || normalizedUser.role === "maintenance") {
|