-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mark Phelps <[email protected]>
- Loading branch information
1 parent
6395fbc
commit 09744c7
Showing
6 changed files
with
52 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import { RootState } from '.'; | ||
|
||
interface PipelinesState { | ||
selectedPipeline: string; | ||
} | ||
|
||
const initialState: PipelinesState = { | ||
selectedPipeline: '' | ||
}; | ||
|
||
export const pipelinesSlice = createSlice({ | ||
name: 'pipelines', | ||
initialState, | ||
reducers: { | ||
setSelectedPipeline: (state, action: PayloadAction<string>) => { | ||
state.selectedPipeline = action.payload; | ||
} | ||
} | ||
}); | ||
|
||
export const getSelectedPipeline = (state: RootState): string => state.pipelines.selectedPipeline; | ||
|
||
export const { setSelectedPipeline } = pipelinesSlice.actions; | ||
|
||
export default pipelinesSlice.reducer; | ||
|
||
export type { PipelinesState }; |