diff --git a/src/PhonoChangeApplier.js b/src/PhonoChangeApplier.js index ac06c52..08db24e 100644 --- a/src/PhonoChangeApplier.js +++ b/src/PhonoChangeApplier.js @@ -102,7 +102,7 @@ const PhonoChangeApplier = () => { - + ); } diff --git a/src/components/Output.js b/src/components/Output.js index 6861213..1aa36a8 100644 --- a/src/components/Output.js +++ b/src/components/Output.js @@ -2,13 +2,33 @@ import React from 'react'; import './Output.scss'; const Output = props => { - const { results } = props; + const { results, options } = props; + const renderResults = () => { + switch(options.output) { + case 'default': + return renderDefault(); + default: + return <> + } + } + + const renderDefault = () => { + return results.map((epoch, i) => { + const lexicon = epoch.lexicon.map(lexeme => {lexeme}); + return ( +
+
{epoch.pass}
+

{lexicon}

+
+ ) + }) + } return (

Results of Run

-
- {results && results.length ? results[0].lexicon.map((lexicalItem, i) =>

{lexicalItem}

) : <>} +
+ {results && results.length ? renderResults() : <>}
); diff --git a/src/components/Output.scss b/src/components/Output.scss index e69de29..3bd79e2 100644 --- a/src/components/Output.scss +++ b/src/components/Output.scss @@ -0,0 +1,6 @@ +div.Output-epoch { + display: flex; + p.lexicon { + display: flex; + } +} \ No newline at end of file