-
Notifications
You must be signed in to change notification settings - Fork 13
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
1 parent
e99a8f7
commit 0901201
Showing
32 changed files
with
256 additions
and
729 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,25 @@ | ||
import { store } from 'index' | ||
import { AddProgressInputs } from 'shared/user/AddProgress' | ||
|
||
export const ADD_PROGRESS_REQUEST = 'ADD_PROGRESS_REQUEST' | ||
export const ADD_PROGRESS_COMMIT = 'ADD_PROGRESS_COMMIT' | ||
export const ADD_PROGRESS_ROLLBACK = 'ADD_PROGRESS_ROLLBACK' | ||
|
||
export const addProgress = ({ chapterDone }: AddProgressInputs) => (dispatch: any) => { | ||
dispatch({ | ||
type: ADD_PROGRESS_REQUEST, | ||
payload: {}, | ||
meta: { | ||
offline: { | ||
effect: { | ||
url: `${process.env.REACT_APP_BACKEND_URL}/user/add-progress`, | ||
method: 'POST', | ||
headers: { Authorization: `Bearer ${store.getState().auth.jwt}` }, | ||
json: { chapterDone }, | ||
}, | ||
commit: { type: ADD_PROGRESS_COMMIT, meta: {} }, | ||
rollback: { type: ADD_PROGRESS_ROLLBACK, meta: {} }, | ||
}, | ||
}, | ||
}) | ||
} |
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,34 @@ | ||
import { ADD_PROGRESS_REQUEST, ADD_PROGRESS_COMMIT, ADD_PROGRESS_ROLLBACK } from './Chapter.actions' | ||
|
||
export interface ProgressState { | ||
loading?: boolean | ||
} | ||
|
||
const progressState: ProgressState = { | ||
loading: false, | ||
} | ||
|
||
export function progress(state = progressState, action: any): ProgressState { | ||
switch (action.type) { | ||
case ADD_PROGRESS_REQUEST: { | ||
return { | ||
...state, | ||
loading: true, | ||
} | ||
} | ||
case ADD_PROGRESS_COMMIT: { | ||
return { | ||
...state, | ||
loading: false, | ||
} | ||
} | ||
case ADD_PROGRESS_ROLLBACK: { | ||
return { | ||
...state, | ||
loading: false, | ||
} | ||
} | ||
default: | ||
return state | ||
} | ||
} |
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
File renamed without changes.
17 changes: 13 additions & 4 deletions
17
.../ChapterAbout/ChapterAbout.controller.tsx → .../ChapterAbout/ChapterAbout.controller.tsx
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
File renamed without changes.
File renamed without changes.
34 changes: 0 additions & 34 deletions
34
src/frontend/src/pages/Chapters/Camel/ChapterAbout/ChapterAbout.data.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.