Refactor socket initialization to include organization and enhance asset event handling; remove unused console logs and improve asset data structure
This commit is contained in:
@@ -37,8 +37,8 @@ const Project: React.FC = () => {
|
||||
setZones([]);
|
||||
const email = localStorage.getItem("email");
|
||||
if (email) {
|
||||
useSocketStore.getState().initializeSocket(email);
|
||||
const Organization = email!.split("@")[1].split(".")[0];
|
||||
useSocketStore.getState().initializeSocket(email, Organization);
|
||||
const name = localStorage.getItem("userName");
|
||||
if (Organization && name) {
|
||||
setOrganization(Organization);
|
||||
|
||||
Reference in New Issue
Block a user