diff --git a/src/components/index/indexConsole/commands/fetchCommands/Album/GetAll.js b/src/components/index/indexConsole/commands/fetchCommands/Album/GetAll.js index ef54d37..d0f8721 100644 --- a/src/components/index/indexConsole/commands/fetchCommands/Album/GetAll.js +++ b/src/components/index/indexConsole/commands/fetchCommands/Album/GetAll.js @@ -6,7 +6,6 @@ import { ResetComponentWithoutInputs } from '../Abstract Utils/ResetComponent' import { mapAllRowsToString } from '../Abstract Utils/MapRowsToString' const AlbumGetAll = ({ - album, getAllAlbum, consoleHistory, setConsoleHistory, componentVisible, setComponentVisible, diff --git a/src/components/index/indexConsole/commands/fetchCommands/Track/GetAll.js b/src/components/index/indexConsole/commands/fetchCommands/Track/GetAll.js index e69de29..8cc45c9 100644 --- a/src/components/index/indexConsole/commands/fetchCommands/Track/GetAll.js +++ b/src/components/index/indexConsole/commands/fetchCommands/Track/GetAll.js @@ -0,0 +1,58 @@ +import React, { useState } from 'react' +import { connect } from 'react-redux' + +import { getAllTrack } from '../../../../../../stores/track/duck/operations' +import { ResetComponentWithoutInputs } from '../Abstract Utils/ResetComponent' +import { mapAllRowsToString } from '../Abstract Utils/MapRowsToString' + +const TrackGetAll = ({ + getAllTrack, + consoleHistory, setConsoleHistory, + componentVisible, setComponentVisible, + activateConsoleInput +}) => { + + const [message, setMessage] = useState('') + + const resetState = () => { + setConsoleHistory(consoleHistory + message) + setComponentVisible(false) + setMessage('') + } + + const mapTracksToString = (albums) => { + let mapFields = [ + 'title', + 'id', + 'album_id', + 'user_id', + 'url_code' + ] + return mapAllRowsToString( albums, 'albums', mapFields ) + } + + return ( +