-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Show artist names after task name when applicable
(cherry picked from commit 6d552f2a60f44052079b5e8944f5e1bbabac56e0) Closes #4678
- Loading branch information
1 parent
b81170d
commit 873a225
Showing
17 changed files
with
419 additions
and
459 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import AppSectionState from 'App/State/AppSectionState'; | ||
import Command from 'Commands/Command'; | ||
|
||
export type CommandAppState = AppSectionState<Command>; | ||
|
||
export default CommandAppState; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { useCallback, useState } from 'react'; | ||
|
||
export default function useModalOpenState( | ||
initialState: boolean | ||
): [boolean, () => void, () => void] { | ||
const [isOpen, setOpen] = useState(initialState); | ||
|
||
const setModalOpen = useCallback(() => { | ||
setOpen(true); | ||
}, [setOpen]); | ||
|
||
const setModalClosed = useCallback(() => { | ||
setOpen(false); | ||
}, [setOpen]); | ||
|
||
return [isOpen, setModalOpen, setModalClosed]; | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend/src/Store/Selectors/createMultiArtistsSelector.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,14 @@ | ||
import { createSelector } from 'reselect'; | ||
import AppState from 'App/State/AppState'; | ||
|
||
function createMultiArtistsSelector(artistIds: number[]) { | ||
return createSelector( | ||
(state: AppState) => state.artist.itemMap, | ||
(state: AppState) => state.artist.items, | ||
(itemMap, allArtists) => { | ||
return artistIds.map((artistId) => allArtists[itemMap[artistId]]); | ||
} | ||
); | ||
} | ||
|
||
export default createMultiArtistsSelector; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.