Skip to content

Commit

Permalink
feat: Only show the store if the .env config is present
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Jun 13, 2024
1 parent 9467ace commit ad269bf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Wrapper/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ApplicationState } from "../../store/root/applicationState";
import { IUiState } from "../../store/ui/types";
import { IUserState } from "../../store/user/types";
import { useTypedSelector } from "../../store/hooks";
import { isEmpty } from "lodash";

type AllProps = IUiState & IUserState & ReduxProp;
type ReduxProp = {
Expand Down Expand Up @@ -90,9 +91,11 @@ const Sidebar: React.FC<AllProps> = ({
{renderLink("/dataset", "Volume View", "dataset")}
</NavItem>

<NavItem itemId="store" isActive={sidebarActiveItem === "store"}>
{renderLink("/store", "Store", "store")}
</NavItem>
{!isEmpty(import.meta.env.VITE_CHRIS_STORE_URL) && (
<NavItem itemId="store" isActive={sidebarActiveItem === "store"}>
{renderLink("/store", "Store", "store")}
</NavItem>
)}
</NavGroup>
</NavList>
</Nav>
Expand Down

0 comments on commit ad269bf

Please sign in to comment.