Refactor asset loading error handling in Assets component; enable loading state reset on error; update Project component to render LoadingPage and Scene conditionally; add AssetDetailsCard component.
This commit is contained in:
@@ -154,12 +154,14 @@ const Assets: React.FC = () => {
|
||||
setCategoryAssets(res);
|
||||
setFiltereredAssets(res);
|
||||
setisLoading(false); // End loading
|
||||
// eslint-disable-next-line
|
||||
} catch (error) {
|
||||
setisLoading(false);
|
||||
echo.error("failed to fetch assets");
|
||||
setisLoading(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="assets-container-main">
|
||||
<Search onChange={handleSearchChange} />
|
||||
|
||||
11
app/src/components/ui/simulation/AssetDetailsCard.tsx
Normal file
11
app/src/components/ui/simulation/AssetDetailsCard.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import React from 'react'
|
||||
|
||||
const AssetDetailsCard:React.FC = () => {
|
||||
return (
|
||||
<div className="asset-details-card-wrapper">
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default AssetDetailsCard
|
||||
@@ -86,7 +86,7 @@ const Project: React.FC = () => {
|
||||
{!selectedUser && (
|
||||
<>
|
||||
<KeyPressListener />
|
||||
{/* {loadingProgress > 0 && <LoadingPage progress={loadingProgress} />} */}
|
||||
{loadingProgress > 0 && <LoadingPage progress={loadingProgress} />}
|
||||
{!isPlaying && (
|
||||
<>
|
||||
{toggleThreeD && <ModuleToggle />}
|
||||
@@ -122,7 +122,7 @@ const Project: React.FC = () => {
|
||||
}
|
||||
onDragOver={(event) => event.preventDefault()}
|
||||
>
|
||||
{/* <Scene /> */}
|
||||
<Scene />
|
||||
</div>
|
||||
{selectedUser && <FollowPerson />}
|
||||
{isLogListVisible && (
|
||||
|
||||
Reference in New Issue
Block a user