-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
350f465
commit 1ce85f6
Showing
30 changed files
with
410 additions
and
23 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
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
22 changes: 22 additions & 0 deletions
22
apps/audius-client/packages/common/src/store/ui/publish-playlist-confirmation-modal/sagas.ts
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,22 @@ | ||
import { takeEvery } from 'redux-saga/effects' | ||
import { put } from 'typed-redux-saga' | ||
|
||
import { setVisibility } from '../modals/slice' | ||
|
||
import { open, OpenPayload, requestOpen } from './slice' | ||
|
||
function* handleRequestOpen(action: OpenPayload) { | ||
const { payload } = action | ||
yield* put(open(payload)) | ||
yield* put( | ||
setVisibility({ modal: 'PublishPlaylistConfirmation', visible: true }) | ||
) | ||
} | ||
|
||
function* watchHandleRequestOpen() { | ||
yield takeEvery(requestOpen, handleRequestOpen) | ||
} | ||
|
||
export default function sagas() { | ||
return [watchHandleRequestOpen] | ||
} |
4 changes: 4 additions & 0 deletions
4
...dius-client/packages/common/src/store/ui/publish-playlist-confirmation-modal/selectors.ts
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,4 @@ | ||
import { CommonState } from 'store/commonStore' | ||
|
||
export const getPlaylistId = (state: CommonState) => | ||
state.ui.publishPlaylistConfirmationModal.playlistId |
30 changes: 30 additions & 0 deletions
30
apps/audius-client/packages/common/src/store/ui/publish-playlist-confirmation-modal/slice.ts
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,30 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit' | ||
|
||
import { Nullable } from 'utils/typeUtils' | ||
|
||
import { ID } from '../../../models/Identifiers' | ||
|
||
type PublishPlaylistConfirmationState = { | ||
playlistId: Nullable<ID> | ||
} | ||
|
||
export type OpenPayload = PayloadAction<{ playlistId: ID }> | ||
|
||
const initialState: PublishPlaylistConfirmationState = { | ||
playlistId: null | ||
} | ||
|
||
const slice = createSlice({ | ||
name: 'applications/ui/publishPlaylistConfirmation', | ||
initialState, | ||
reducers: { | ||
requestOpen: (_state, _action: OpenPayload) => {}, | ||
open: (state, action: OpenPayload) => { | ||
state.playlistId = action.payload.playlistId | ||
} | ||
} | ||
}) | ||
|
||
export const { open, requestOpen } = slice.actions | ||
export const actions = slice.actions | ||
export default slice.reducer |
6 changes: 6 additions & 0 deletions
6
apps/audius-client/packages/common/src/store/ui/publish-playlist-confirmation-modal/types.ts
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,6 @@ | ||
import { ID } from '../../../models/Identifiers' | ||
|
||
export type PublishPlaylistConfirmationModalState = { | ||
isOpen: boolean | ||
playlistId: ID | null | ||
} |
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
13 changes: 13 additions & 0 deletions
13
apps/audius-client/packages/mobile/src/assets/images/iconPencil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.