Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Fix mobile share of playlist permalink (#3913)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-kiam authored Aug 21, 2023
1 parent 1e376fe commit 8c24bdd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/mobile/src/utils/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@ export const getCollectionRoute = (
collection: UserCollection,
fullUrl = false
) => {
const { playlist_name, playlist_id, is_album, user } = collection
const { handle } = user
const encodedHandle = encodeUrlName(handle)
const encodedPlaylistName = encodeUrlName(playlist_name)
const collectionType = is_album ? 'album' : 'playlist'
const route = `/${encodedHandle}/${collectionType}/${encodedPlaylistName}-${playlist_id}`
const { permalink } = collection

return fullUrl ? `${AUDIUS_URL}${route}` : route
return fullUrl ? `${AUDIUS_URL}${permalink}` : permalink || ''
}

export const getSearchRoute = (query: string, fullUrl = false) => {
Expand Down

0 comments on commit 8c24bdd

Please sign in to comment.