Skip to content

Commit

Permalink
restricts marketplace tab (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
scandycuz authored Oct 11, 2024
1 parent 7254ef3 commit 86680d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/studio/src/pages/home/library/ViewDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import MintSong from "./MintSong";
import SongInfo from "./SongInfo";
import { SongRouteParams } from "./types";
import { MarketplaceTab } from "./MarketplaceTab";
import { useGetProfileQuery } from "../../../modules/session";
import { NEWM_SUPPORT_EMAIL, isSongEditable } from "../../../common";
import { setToastMessage } from "../../../modules/ui";
import {
Expand Down Expand Up @@ -64,6 +65,8 @@ const ViewDetails: FunctionComponent = () => {

const { songId } = useParams<"songId">() as SongRouteParams;

const { data: profile } = useGetProfileQuery();

const {
data: { title, coverArtUrl, mintingStatus } = emptySong,
error,
Expand All @@ -80,7 +83,9 @@ const ViewDetails: FunctionComponent = () => {
].includes(mintingStatus);

const isManageMarketplaceSalesEnabled =
clientConfig?.featureFlags?.manageMarketplaceSalesEnabled ?? false;
profile?.email === "[email protected]" ??
clientConfig?.featureFlags?.manageMarketplaceSalesEnabled ??
false;

const shouldRenderMarketplaceTab =
!isClientConfigLoading &&
Expand Down

0 comments on commit 86680d8

Please sign in to comment.