diff --git a/frontend/src/views/Apps2.jsx b/frontend/src/views/Apps2.jsx index 87fefcfd..3b8fd0e8 100644 --- a/frontend/src/views/Apps2.jsx +++ b/frontend/src/views/Apps2.jsx @@ -12,6 +12,7 @@ import { Box, CircularProgress, Checkbox, + Skeleton, } from "@mui/material"; import { Context } from "../context/ContextApi.jsx"; import Add from '@mui/icons-material/Add'; @@ -280,7 +281,6 @@ const Hits = ({ const [showNoAppFound, setShowNoAppFound] = useState(false); - //show some delay to show the "App Not Found." so it doesn't not show while changing tab. useEffect(() => { const timer = setTimeout(() => { setShowNoAppFound(true); @@ -514,7 +514,7 @@ const Hits = ({ )} ) : ( -
+ ) } @@ -750,6 +750,81 @@ const filterApps = (apps, searchQuery, selectedCategory, selectedLabel) => { }); }; +// Add this new component for the app skeleton +const AppSkeleton = () => { + return ( + +
+ +
+ + + +
+
+
+ ); +}; + +// Replace the loading sections in the main component with this +const LoadingGrid = () => { + return ( +
+ {[...Array(7)].map((_, index) => ( + + ))} +
+ ); +}; + // Main Apps Component const Apps2 = (props) => { const { globalUrl, isLoaded, serverside, userdata, isLoggedIn, checkLogin } = props; @@ -1237,9 +1312,7 @@ const Apps2 = (props) => { currTab === 0 && (
{isLoading ? ( -
- -
+ ) : ( <> {appsToShow?.length > 0 && appsToShow !== undefined && !isLoading ? ( @@ -1292,9 +1365,7 @@ const Apps2 = (props) => { currTab === 1 && (
{isLoading ? ( -
- -
+ ) : ( <> {appsToShow?.length > 0 && appsToShow !== undefined ? (