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

Commit

Permalink
[C-991] Add native create/edit playlists (#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers authored and sliptype committed Sep 9, 2022
1 parent 35ff23c commit 94c1343
Show file tree
Hide file tree
Showing 33 changed files with 1,137 additions and 742 deletions.
326 changes: 192 additions & 134 deletions packages/common/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "https://github.com/AudiusProject/audius-client/issues"
},
"dependencies": {
"@audius/sdk": "1.0.1",
"@audius/sdk": "1.0.2",
"@fingerprintjs/fingerprintjs-pro": "3.5.6",
"@optimizely/optimizely-sdk": "4.0.0",
"@reduxjs/toolkit": "1.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export * from './change-password'
export * from './lineup'
export * from './notifications'
export * from './pages'
export * from './playlist-library/helpers'
export * from './playlist-library'
export * from './queue'
export * from './reachability'
export * from './recovery-email'
Expand Down
6 changes: 6 additions & 0 deletions packages/common/src/store/playlist-library/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export {
default as playlistLibraryReducer,
actions as playlistLibraryActions
} from './slice'
export type { PlaylistLibraryState } from './slice'
export * as playlistLibraryHelpers from './helpers'
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { PlaylistLibrary } from '@audius/common'
import { createSlice, PayloadAction } from '@reduxjs/toolkit'

const initialState = {}
import { PlaylistLibrary } from '../../models'

export type PlaylistLibraryState = {}

const initialState: PlaylistLibraryState = {}

export type UpdatePayload = {
playlistLibrary: PlaylistLibrary
Expand All @@ -11,10 +14,11 @@ const slice = createSlice({
name: 'playlist-library',
initialState,
reducers: {
update: (state, action: PayloadAction<UpdatePayload>) => {}
update: (_state, _action: PayloadAction<UpdatePayload>) => {}
}
})

export const { update } = slice.actions
export const actions = slice.actions

export default slice.reducer
10 changes: 10 additions & 0 deletions packages/common/src/store/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ import trendingUnderground from './pages/trending-underground/slice'
import trending from './pages/trending/reducer'
import { TrendingPageState } from './pages/trending/types'
import player, { PlayerState } from './player/slice'
import {
playlistLibraryReducer,
PlaylistLibraryState
} from './playlist-library'
import queue from './queue/slice'
import reachability from './reachability/reducer'
import { ReachabilityState } from './reachability/types'
Expand Down Expand Up @@ -129,6 +133,9 @@ export const reducers = () => ({
// Cast
cast,

// Playlist Library
playlistLibrary: playlistLibraryReducer,

// UI
ui: combineReducers({
averageColor: averageColorReducer,
Expand Down Expand Up @@ -225,6 +232,9 @@ export type CommonState = {
// Cast
cast: ReturnType<typeof cast>

// Playlist library
playlistLibrary: PlaylistLibraryState

ui: {
averageColor: ReturnType<typeof averageColorReducer>
buyAudio: ReturnType<typeof buyAudioReducer>
Expand Down

0 comments on commit 94c1343

Please sign in to comment.