Skip to content

Commit d5aa839

Browse files
committed
Show DownloadManager only for valid users in browser
DownloadManager is now rendered only if the user is valid and the app is not running in Electron. This prevents the DownloadManager from appearing for invalid users or in the Electron environment.
1 parent bba0fc8 commit d5aa839

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/features/status-bar/components/StatusBar.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ import { HelpMenuItemsLabel } from 'features/status-bar/components/help-menu-ite
1515
import { PLOT_SCRIPTS, VIEW_MAP_RESULTS } from 'features/plots/constants';
1616
import JobInfoModal from 'features/jobs/components/Jobs/JobInfoModal';
1717
import DownloadManager from 'features/upload-download/components/DownloadManager';
18+
import { isElectron } from 'utils/electron';
19+
import { useIsValidUser } from 'stores/userStore';
1820

1921
const StatusBar = () => {
22+
const isValidUser = useIsValidUser();
23+
2024
return (
2125
<div id="cea-status-bar-container">
2226
<div id="cea-status-bar-left">
2327
<CEAVersion />
2428
</div>
2529
<div id="cea-status-bar-right">
2630
<JobStatusBar />
27-
<DownloadManager />
31+
{isValidUser && !isElectron() && <DownloadManager />}
2832
<div className="cea-status-bar-button primary">
2933
<DropdownMenu />
3034
</div>

0 commit comments

Comments
 (0)