-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into feature/slicing-pipeline
- Loading branch information
Showing
14 changed files
with
261 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { fetchPreferences } from '../utils/preferences-api'; | ||
|
||
// Action Types | ||
export const UPDATE_USER_PREFERENCES = 'UPDATE_USER_PREFERENCES'; | ||
|
||
// Action Creators | ||
export const updateUserPreferences = (preferences) => ({ | ||
type: UPDATE_USER_PREFERENCES, | ||
payload: preferences, | ||
}); | ||
|
||
export const getPreferences = () => async (dispatch) => { | ||
try { | ||
const preferences = await fetchPreferences(); | ||
dispatch(updateUserPreferences(preferences)); | ||
} catch (error) { | ||
console.error('Error fetching preferences:', error); | ||
} | ||
}; |
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,19 @@ | ||
import { UPDATE_USER_PREFERENCES } from '../actions/preferences'; | ||
|
||
const initialState = { | ||
showDatasetPreviews: true, | ||
}; | ||
|
||
const userPreferences = (state = initialState, action) => { | ||
switch (action.type) { | ||
case UPDATE_USER_PREFERENCES: | ||
return { | ||
...state, | ||
showDatasetPreviews: action.payload.showDatasetPreviews, | ||
}; | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
export default userPreferences; |
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.