Skip to content

Commit

Permalink
STUD-381: Add disable minting flag on edit song logic (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
escobarjonatan authored Nov 22, 2024
1 parent d38cfb7 commit d638cb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/studio/src/pages/home/library/EditSong.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useNavigate, useParams } from "react-router";
import * as Yup from "yup";
import { resizeCloudinaryImage } from "@newm-web/utils";
import { MintingStatus } from "@newm-web/types";
import { useFlags } from "launchdarkly-react-client-sdk";
import DeleteSongModal from "./DeleteSongModal";
import { SongRouteParams } from "./types";
import {
Expand Down Expand Up @@ -48,6 +49,7 @@ const EditSong: FunctionComponent = () => {
const dispatch = useDispatch();
const { songId } = useParams<"songId">() as SongRouteParams;

const { webStudioDisableTrackDistributionAndMinting } = useFlags();
const { data: genres = [] } = useGetGenresQuery();
const { data: roles = [] } = useGetRolesQuery();
const {
Expand Down Expand Up @@ -171,7 +173,9 @@ const EditSong: FunctionComponent = () => {
ipi: ipis?.join(", "),
isExplicit: parentalAdvisory === "Explicit",
isInstrumental: instrumental,
isMinting: isSongEditable(mintingStatus),
isMinting:
isSongEditable(mintingStatus) &&
!webStudioDisableTrackDistributionAndMinting,
isrc,
iswc,
language,
Expand Down

0 comments on commit d638cb4

Please sign in to comment.