diff --git a/backend/go-app/main.go b/backend/go-app/main.go index eaab40da..4495d7aa 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3809,6 +3809,7 @@ func remoteOrgJobHandler(org shuffle.Org, interval int) error { // Check if it's 1/20 times (600 seconds - 10 min on average) // Only problem: May take time to sync the first time, which is annoying + // This is to ensure that we don't spam the shuffle cloud servers with a lot of data shouldBackupData := false randomNumber := rand.Intn(20) if randomNumber == 0 { diff --git a/frontend/src/views/Apps2.jsx b/frontend/src/views/Apps2.jsx index 8c8e4284..da7dd5c8 100644 --- a/frontend/src/views/Apps2.jsx +++ b/frontend/src/views/Apps2.jsx @@ -347,7 +347,6 @@ const Hits = ({ } }, [currTab, window.location]); - //Function for activation and deactivation of app const handleActivateButton = (event, data, type) => { @@ -1205,7 +1204,7 @@ const Apps2 = (props) => { // Find top categories and tags based on the current tab useEffect(() => { - if (currTab === 0 || currTab === 1) { + if (currTab === 0 || currTab === 1 || currTab === 3) { setCategories(findTopCategories()); setLabels(findTopTags()); } @@ -1325,19 +1324,21 @@ const Apps2 = (props) => { } } - console.log("BACKUPAPPS: ", backups) if (backups.length > 0) { setBackupApps(backups) } privateapps.push(...valid); privateapps.push(...invalid); - console.log("privateapps: setting apps ", privateapps) + setAppsToShow(privateapps); setOrgApps(privateapps); setApps(privateapps); - // setFilteredApps(privateapps); + //setFilteredApps(privateapps); + const filteredOrgApps = filterApps(privateapps, searchQuery, selectedCategory, selectedLabel); + setAppsToShow(filteredOrgApps) + if (privateapps.length > 0) { if (selectedApp?.id === undefined || selectedApp?.id === null) { if (privateapps[0]?.owner !== undefined && privateapps[0]?.owner !== null) { @@ -1345,6 +1346,7 @@ const Apps2 = (props) => { } } } + if (privateapps?.length > 0 && storageApps?.length === 0) { try { localStorage.setItem("apps", JSON.stringify(privateapps)) @@ -2106,6 +2108,7 @@ const Apps2 = (props) => { ))} + {selectedCategory.length > 0 && ( {
{ - currTab === 0 || currTab === 3 && ( + currTab !== 0 && currTab !== 3 ? + null + : + (
{isLoading ? (