Skip to content

Commit

Permalink
feat(Results): change page layout and button labels (#133)
Browse files Browse the repository at this point in the history
* feat(Results): reposition new test elements

* feat(Results): update button labels
  • Loading branch information
lorenzocorallo authored Mar 18, 2024
1 parent 4da88b3 commit ab66b4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions src/components/pages/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ const styles = StyleSheet.create({
textAlign: 'center',
maxWidth: 500
},
restartButton: {
margin: '12px',
marginBottom: '32px'
restartButtons: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexWrap: 'wrap'
},
link: {
display: 'inline-flex',
Expand Down Expand Up @@ -245,12 +247,18 @@ export default function Results(props: ResultsProps) {
<div style={styles.div}>
<div className="do-not-print">{resultTable()}</div>

<ExtendedCorrection
answers={props.answers}
questions={props.questions}
resultTable={resultTable()}
onSave={() => setIsResultSaved(true)}
/>
<div style={styles.restartDiv}>
<h3 style={styles.restartTitle}>{t('results.saveReminder')}</h3>
<div style={styles.restartButtons}>
<ExtendedCorrection
answers={props.answers}
questions={props.questions}
resultTable={resultTable()}
onSave={() => setIsResultSaved(true)}
/>
<Button label={t('results.btn.home')} onClick={handleNewTest} />
</div>
</div>

<div className="do-not-print">
<h3 style={styles.h3}>{t('results.pointsCalc.title')}</h3>
Expand Down Expand Up @@ -329,14 +337,6 @@ export default function Results(props: ResultsProps) {
</ul>
<Trans i18n={i18n}>results.pointsCalc.body.2</Trans>
</p>
<div style={styles.restartDiv}>
<h3 style={styles.restartTitle}>{t('results.saveReminder')}</h3>
<Button
label={t('results.btn.home')}
style={styles.restartButton}
onClick={handleNewTest}
/>
</div>
</div>
</div>
</Wrapper>
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
},
"saveReminder": "Remember to save your results before starting a new test, or they will be lost!",
"btn": {
"home": "Go back to home",
"save": "Save test results"
"home": "Start a new test",
"save": "Save my results"
},
"pdf": {
"title": "Simulation of {{- date}} at {{- time}}",
Expand Down
4 changes: 2 additions & 2 deletions src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
},
"saveReminder": "Ricordati di salvare i tuoi risultati prima di iniziare un nuovo test, o andranno persi!",
"btn": {
"home": "Torna alla home",
"save": "Salva risultati della simulazione"
"home": "Inizia un nuovo test",
"save": "Salva i miei risultati"
},
"pdf": {
"title": "Simulazione del {{- date}} alle {{- time}}",
Expand Down

0 comments on commit ab66b4a

Please sign in to comment.