-
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
Showing
177 changed files
with
3,336 additions
and
3,801 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
module.exports = { | ||
roots: ["<rootDir>/src"], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], | ||
// Setup Enzyme | ||
snapshotSerializers: ["enzyme-to-json/serializer"], | ||
setupFilesAfterEnv: ["<rootDir>/src/client/setupTest.ts"] | ||
}; |
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
15 changes: 7 additions & 8 deletions
15
src/client/UniversalProvider.js → src/client/UniversalProvider.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
File renamed without changes.
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,35 @@ | ||
import actionsType, { | ||
ADD_BOARD_LOADING, | ||
ADD_BOARD_LOADED, | ||
ADD_BOARD_ERROR | ||
} from "./actionsType"; | ||
import BoardApi from "../api/BoardApi"; | ||
import { Dispatch } from "redux"; | ||
|
||
export function listAllBoards(idUser: Number): any { | ||
return (dispatch: Dispatch) => { | ||
dispatch({ type: actionsType.BOARDS_LOADING }); | ||
|
||
return BoardApi.listAllByUser(idUser) | ||
.then(({ data: { success, boards } }: any) => { | ||
dispatch({ type: actionsType.BOARDS_LOADED_SUCCESS, success, boards }); | ||
}) | ||
.catch(data => { | ||
dispatch({ type: actionsType.BOARDS_LOADING_ERROR, data }); | ||
}); | ||
}; | ||
} | ||
|
||
export function addBoard(name: String): any { | ||
return (dispatch: Dispatch) => { | ||
dispatch({ type: ADD_BOARD_LOADING }); | ||
|
||
return BoardApi.addBoard(name) | ||
.then(({ data: { success, board } }) => { | ||
dispatch({ type: ADD_BOARD_LOADED, success, board }); | ||
}) | ||
.catch(data => { | ||
dispatch({ type: ADD_BOARD_ERROR, data }); | ||
}); | ||
}; | ||
} |
Oops, something went wrong.