forked from AntonioMrtz/SpotifyElectron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refractor: rename variable, fronend fix to show songs in separate com…
…ponent, openapi generated | [AntonioMrtz#228]
- Loading branch information
Tomáš Telepčák
committed
Nov 12, 2024
1 parent
a1978cd
commit c360e6e
Showing
17 changed files
with
145 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Electron/src/components/ShowAllItems/Items/ItemsAllSongsFromStreamHistory.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import SongCard from 'components/Cards/SongCard/SongCard'; | ||
import useFetchGetUserStreamHistory from 'hooks/useFetchGetUserPlaybackHistory'; | ||
import { saniticeUserName } from 'utils/saniticeParameters'; | ||
import { PropsItemsSongsStreamHistory } from '../types/PropsItems'; | ||
|
||
export default function ItemsAllSongsFromStreamHistory({ | ||
refreshSidebarData, | ||
changeSongName, | ||
userName, | ||
}: PropsItemsSongsStreamHistory) { | ||
const { streamHistory } = useFetchGetUserStreamHistory( | ||
saniticeUserName(userName), | ||
); | ||
|
||
return ( | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
<> | ||
{streamHistory && | ||
streamHistory.map((songItem, index) => { | ||
return ( | ||
<SongCard | ||
// eslint-disable-next-line react/no-array-index-key | ||
key={`${songItem.name}-${index}`} | ||
name={songItem.name} | ||
photo={songItem.photo} | ||
artist={songItem.artist} | ||
changeSongName={changeSongName} | ||
refreshSidebarData={refreshSidebarData} | ||
/> | ||
); | ||
})} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.