update assetID

This commit is contained in:
2025-06-12 09:31:51 +05:30
parent 9b0842ed14
commit c7cc5cf2ca
59 changed files with 1039 additions and 1029 deletions

View File

@@ -8,11 +8,20 @@ import DashboardTrash from "../components/Dashboard/DashboardTrash";
import { getUserData } from "../components/Dashboard/functions/getUserData";
import SidePannel from "../components/Dashboard/SidePannel";
import DashboardTutorial from "../components/Dashboard/DashboardTutorial";
import { useProductStore } from "../store/simulation/useProductStore";
import { useEventsStore } from "../store/simulation/useEventsStore";
const Dashboard: React.FC = () => {
const [activeTab, setActiveTab] = useState<string>("Home");
const { socket } = useSocketStore();
const { userId, organization, email, userName } = getUserData();
const { clearProducts } = useProductStore();
const { clearEvents } = useEventsStore();
useEffect(() => {
clearEvents();
clearProducts();
}, [])
useEffect(() => {
const token = localStorage.getItem("token");

View File

@@ -61,14 +61,13 @@ const UserAuth: React.FC = () => {
const projects = await recentlyViewed(organization, res.message.userId);
console.log('projects: ', projects);
if (Object.values(projects.RecentlyViewed).length > 0) {
const firstId = (Object.values(projects?.RecentlyViewed || {})[0] as any)?._id;
setLoadingProgress(1)
navigate(`/${firstId}`)
} else {
if (res.message.isShare) {
if (res.message.isShare) {
if (Object.values(projects.RecentlyViewed).length > 0) {
const firstId = (Object.values(projects?.RecentlyViewed || {})[0] as any)?._id;
setLoadingProgress(1)
navigate(`/${firstId}`)
} else {
setLoadingProgress(1);
// navigate("/Project");
navigate("/Dashboard");
}
}