mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
Add API for frameworks and examples (#3514)
* Add API for frameworks and examples * Adjust headers * Update frameworks list * Always use latest * Add types * Use now repo for downloading and listing * Use .existsSync * Remove unused packages * Use 307 for redirect * Add examples * Update tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Make examples unique * Remove detectors from frameworks API * Use /api instead of Next.js * Install dependencies * Rename project * Change name * Empty * Change name * Update api/tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Update examples Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
19
examples/ionic-react/src/data/user/user.reducer.ts
Normal file
19
examples/ionic-react/src/data/user/user.reducer.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { UserActions } from './user.actions';
|
||||
import { UserState } from './user.state';
|
||||
|
||||
export function userReducer(state: UserState, action: UserActions): UserState {
|
||||
switch (action.type) {
|
||||
case 'set-user-loading':
|
||||
return { ...state, loading: action.isLoading };
|
||||
case 'set-user-data':
|
||||
return { ...state, ...action.data };
|
||||
case 'set-username':
|
||||
return { ...state, username: action.username };
|
||||
case 'set-has-seen-tutorial':
|
||||
return { ...state, hasSeenTutorial: action.hasSeenTutorial };
|
||||
case 'set-dark-mode':
|
||||
return { ...state, darkMode: action.darkMode };
|
||||
case 'set-is-loggedin':
|
||||
return { ...state, isLoggedin: action.loggedIn };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user