Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 29, 2023
1 parent eb57964 commit 88ab64c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ducks/dictImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ export const selectors = {
getStep(state) {
return state.dictImport.get("step");
},
getNextStep(state) {
getNextStep(state, minimum=0) {
switch (state.dictImport.get("step")) {
case "LINKING":
return (
state.dictImport
.get("linking")
.toArray()
.reduce((count, info) => count + info.get("values").filter(value => value).size, 0) > 0
.reduce((count, info) => count + info.get("values").filter(value => value).size, 0) > minimum
);

case "COLUMNS":
Expand Down
8 changes: 4 additions & 4 deletions src/pages/CorpImport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class Info extends React.Component {
return (
<div className="background-content">
<Step.Group widths={4}>
<Step link active={step === "ROLES"} onClick={this.onStepClick("ROLES")}>
<Step link active={step === "LINKING"} onClick={this.onStepClick("LINKING")}>
<Step.Content>
<Step.Title>{this.context("Roles")}</Step.Title>
<Step.Description>{this.context("Assign base and subordinate columns")}</Step.Description>
Expand Down Expand Up @@ -196,7 +196,7 @@ class Info extends React.Component {
</Step.Group>

<div style={{ minHeight: "400px", background: "white" }}>
{step === "ROLES" && (
{step === "LINKING" && (
<Linker
blobs={blobs}
state={linking}
Expand Down Expand Up @@ -262,7 +262,7 @@ class Info extends React.Component {
>
{this.context("Next Step")}
</Button>
) : step === "ROLES" ? (
) : step === "LINKING" ? (
<Message style={{ margin: 0, textAlign: "center" }}>
<Message.Content>{this.context("Choose at least two parent corpora.")}</Message.Content>
</Message>
Expand All @@ -281,7 +281,7 @@ Info.contextType = TranslationContext;
function mapStateToProps(state) {
return {
step: selectors.getStep(state),
isNextStep: selectors.getNextStep(state),
isNextStep: selectors.getNextStep(state, 1),
blobs: selectors.getBlobs(state),
linking: selectors.getLinking(state),
columnTypes: selectors.getColumnTypes(state),
Expand Down

0 comments on commit 88ab64c

Please sign in to comment.