|
|
|
@ -74,19 +74,19 @@ function homePageStateReducer(
|
|
|
|
|
): HomePageState {
|
|
|
|
|
switch (action.type) {
|
|
|
|
|
case HomePageStateActionKind.UPDATE_TACTICS:
|
|
|
|
|
return { ...state!, tactics: action.tactics }
|
|
|
|
|
return { ...state, tactics: action.tactics }
|
|
|
|
|
|
|
|
|
|
case HomePageStateActionKind.UPDATE_TEAMS:
|
|
|
|
|
return { ...state!, teams: action.teams }
|
|
|
|
|
return { ...state, teams: action.teams }
|
|
|
|
|
|
|
|
|
|
case HomePageStateActionKind.SET_EXPORTING_TACTIC:
|
|
|
|
|
return { ...state!, exportingTacticId: action.tacticId }
|
|
|
|
|
return { ...state, exportingTacticId: action.tacticId }
|
|
|
|
|
|
|
|
|
|
case HomePageStateActionKind.ADD_TACTIC:
|
|
|
|
|
return { ...state!, tactics: [action.tactic, ...state.tactics] }
|
|
|
|
|
return { ...state, tactics: [action.tactic, ...state.tactics] }
|
|
|
|
|
|
|
|
|
|
case HomePageStateActionKind.REMOVE_TACTIC:
|
|
|
|
|
return { ...state!, tactics: state.tactics.filter(t => t.id !== action.tacticId) }
|
|
|
|
|
return { ...state, tactics: state.tactics.filter(t => t.id !== action.tacticId) }
|
|
|
|
|
|
|
|
|
|
case HomePageStateActionKind.INIT:
|
|
|
|
|
return action.state
|
|
|
|
@ -147,7 +147,6 @@ export default function HomePage() {
|
|
|
|
|
<div id="exports-popup">
|
|
|
|
|
<ExportTacticPopup
|
|
|
|
|
service={tacticExportService}
|
|
|
|
|
show={true}
|
|
|
|
|
onHide={() =>
|
|
|
|
|
dispatch({
|
|
|
|
|
type: HomePageStateActionKind.SET_EXPORTING_TACTIC,
|
|
|
|
@ -223,7 +222,7 @@ function TacticImportArea() {
|
|
|
|
|
handleChange={handleDrop}
|
|
|
|
|
types={["json"]}
|
|
|
|
|
hoverTitle="Déposez ici"
|
|
|
|
|
label="Séléctionnez ou déposez un fichier ici"></FileUploader>
|
|
|
|
|
label="Séléctionnez ou déposez un fichier ici"/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|