Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STUD-381: Add disable minting flag on edit song logic #832

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading