discard - FULL from jamtrack name in listings
This commit is contained in:
parent
2786c74175
commit
2c6f1ef0de
|
|
@ -7,6 +7,7 @@ import { Spinner } from 'reactstrap';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import playIcon from '../../assets/img/icons/play-icon.svg';
|
import playIcon from '../../assets/img/icons/play-icon.svg';
|
||||||
import pauseIcon from '../../assets/img/icons/pause-icon.svg';
|
import pauseIcon from '../../assets/img/icons/pause-icon.svg';
|
||||||
|
import { useJamTrack } from '../../hooks/useJamTrack';
|
||||||
|
|
||||||
const JKJamTrackTrack = ({ track }) => {
|
const JKJamTrackTrack = ({ track }) => {
|
||||||
const [isPlaying, setIsPlaying] = useState(false);
|
const [isPlaying, setIsPlaying] = useState(false);
|
||||||
|
|
@ -16,6 +17,8 @@ const JKJamTrackTrack = ({ track }) => {
|
||||||
const [trackSound, setTrackSound] = useState(null);
|
const [trackSound, setTrackSound] = useState(null);
|
||||||
const { currentPlayTrackId, setCurrentPlayTrackId } = useJamTrackPreview();
|
const { currentPlayTrackId, setCurrentPlayTrackId } = useJamTrackPreview();
|
||||||
|
|
||||||
|
const { trackName } = useJamTrack();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!track) {
|
if (!track) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -124,7 +127,7 @@ const JKJamTrackTrack = ({ track }) => {
|
||||||
<JKInstrumentIcon instrumentId={trackInfo.instrumentId} instrumentName={trackInfo.instrumentDescription} />
|
<JKInstrumentIcon instrumentId={trackInfo.instrumentId} instrumentName={trackInfo.instrumentDescription} />
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{trackInfo.instrumentDescription} {trackInfo.part}
|
{trackName(track)}
|
||||||
</span>
|
</span>
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<span className="ml-1">
|
<span className="ml-1">
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ const CheckoutAside = () => {
|
||||||
return (
|
return (
|
||||||
<tr className="border-bottom" key={shoppingCartItem.id}>
|
<tr className="border-bottom" key={shoppingCartItem.id}>
|
||||||
<th className="pl-0">
|
<th className="pl-0">
|
||||||
{ shoppingCartItem.product_info.sale_display }
|
{ shoppingCartItem.product_info.sale_display.replace(/- FULL/, "") }
|
||||||
</th>
|
</th>
|
||||||
<th className="pr-0 text-right">
|
<th className="pr-0 text-right">
|
||||||
{currency}
|
{currency}
|
||||||
|
|
|
||||||
|
|
@ -52,17 +52,17 @@ export const useJamTrack = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const createMixdown = (options) => {
|
const createMixdown = (options) => {
|
||||||
console.log('*_DEBUG_ createNewMixdown', options);
|
//console.log('*_DEBUG_ createNewMixdown', options);
|
||||||
dispatch(createMyMixdown(options));
|
dispatch(createMyMixdown(options));
|
||||||
};
|
};
|
||||||
|
|
||||||
const enqueueMixdownForSigning = (options) => {
|
const enqueueMixdownForSigning = (options) => {
|
||||||
console.log('*_DEBUG_ enqueueMixdownForSigning', options);
|
//console.log('*_DEBUG_ enqueueMixdownForSigning', options);
|
||||||
dispatch(enqueueMyMixdown(options));
|
dispatch(enqueueMyMixdown(options));
|
||||||
};
|
};
|
||||||
|
|
||||||
const showEstimatedTime = () => {
|
const showEstimatedTime = () => {
|
||||||
console.log('*_DEBUG_ showEstimatedTime enqueuedMixdown', enqueuedMixdown);
|
//console.log('*_DEBUG_ showEstimatedTime enqueuedMixdown', enqueuedMixdown);
|
||||||
if(!enqueuedMixdown || !enqueuedMixdown.packages || enqueuedMixdown.packages.length === 0) {
|
if(!enqueuedMixdown || !enqueuedMixdown.packages || enqueuedMixdown.packages.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -229,9 +229,11 @@ export const useJamTrack = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const trackName = track => {
|
const trackName = track => {
|
||||||
if (track.track_type === 'Track' || track.track_type === 'Click') {
|
if (track.track_type === 'Track' || track.track_type === 'Click' || track.track_type === 'Master') {
|
||||||
if (track.track_type === 'Click') {
|
if (track.track_type === 'Click') {
|
||||||
return 'Clicktrack';
|
return 'Clicktrack';
|
||||||
|
} else if (track.track_type === 'Master') {
|
||||||
|
return 'Master Mix';
|
||||||
} else if (track.instrument) {
|
} else if (track.instrument) {
|
||||||
const instrumentDescription = track.instrument.description;
|
const instrumentDescription = track.instrument.description;
|
||||||
const instrumentDescriptionParts = instrumentDescription.split(' ');
|
const instrumentDescriptionParts = instrumentDescription.split(' ');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue