-
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.
- Loading branch information
Alder Whiteford
authored and
Alder Whiteford
committed
Jun 20, 2024
1 parent
5bf3021
commit 4652be8
Showing
14 changed files
with
70 additions
and
41 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
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,37 @@ | ||
import { Event, Tag } from '@generatesac/lib'; | ||
Check failure on line 1 in frontend/mobile/src/store/slices/globalSlice.ts GitHub Actions / Lint
|
||
import { createSlice } from '@reduxjs/toolkit'; | ||
|
||
type GlobalState = { | ||
platform: 'web' | 'mobile'; | ||
loggedIn: boolean; | ||
accessToken?: string; | ||
}; | ||
|
||
const initialState: GlobalState = { | ||
platform: 'mobile', | ||
loggedIn: false, | ||
}; | ||
|
||
export const globalSlice = createSlice({ | ||
name: 'global', | ||
initialState, | ||
reducers: { | ||
setLoggedIn: (state, action) => { | ||
state.loggedIn = action.payload; | ||
}, | ||
setAccessToken: (state, action) => { | ||
state.accessToken = action.payload; | ||
}, | ||
resetAccessToken: (state) => { | ||
state.accessToken = undefined; | ||
state.loggedIn = false; | ||
} | ||
} | ||
}); | ||
|
||
export const { | ||
setLoggedIn, | ||
setAccessToken, | ||
resetAccessToken | ||
} = globalSlice.actions; | ||
export default globalSlice.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
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 |
---|---|---|
|
@@ -1402,10 +1402,10 @@ | |
humps "^2.0.1" | ||
prop-types "^15.7.2" | ||
|
||
"@generatesac/[email protected].180": | ||
version "0.0.180" | ||
resolved "https://registry.yarnpkg.com/@generatesac/lib/-/lib-0.0.180.tgz#01a5866af05ccbd369e14faddb8acb2745b9fece" | ||
integrity sha512-UxIBGebRwwHdNyX8CHMmMTbC6WwQMKbvzAtRGCZyMvkldasw+XdQ9+F+WzZyR6OF1Lp84VLJsF6UAIYLO1slVQ== | ||
"@generatesac/[email protected].184": | ||
version "0.0.184" | ||
resolved "https://registry.yarnpkg.com/@generatesac/lib/-/lib-0.0.184.tgz#1a024934e05e69685a46bfcfe388fdf8b4809226" | ||
integrity sha512-btRNxaCH7ovI9WCRt/0fsaUTW2mWzhgDZwBC6fDmIH929bo6etX477jPAdtBJXAWxMz/RIYvIAuLRda8qma/oA== | ||
dependencies: | ||
"@reduxjs/toolkit" "^2.2.3" | ||
react "^18.2.0" | ||
|