-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix - Improved handling of ViewHome clicked statuses
- Loading branch information
gareth.james
committed
Oct 2, 2023
1 parent
1fc6ab6
commit 0352e6f
Showing
4 changed files
with
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { createSlice } from '@reduxjs/toolkit'; | ||
|
||
const initialState = { | ||
pageMainHeight: 0, | ||
pageMainScrollTop: 0, | ||
prefersReducedMotion: window.matchMedia('(prefers-reduced-motion: reduce)').matches, | ||
}; | ||
|
||
export const storeSliceSettings = createSlice({ | ||
name: 'settings', | ||
initialState, | ||
reducers: { | ||
setPageMainHeight: (state, action) => { | ||
const { payload } = action; | ||
state.pageMainHeight = payload; | ||
}, | ||
setPageMainScrollTop: (state, action) => { | ||
const { payload } = action; | ||
state.pageMainScrollTop = payload; | ||
}, | ||
}, | ||
}); | ||
|
||
export const { | ||
setPageMainHeight, | ||
setPageMainScrollTop, | ||
} = storeSliceSettings.actions; | ||
|
||
export default storeSliceSettings.reducer; |
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