Updated the PDF report to show the level instead of the score
This commit is contained in:
@@ -4,13 +4,14 @@ import React from "react";
|
||||
import {View, Text, Image} from "@react-pdf/renderer";
|
||||
import {styles} from "../styles";
|
||||
import {ModuleScore} from "@/interfaces/module.scores";
|
||||
import {calculateBandScore} from "@/utils/score";
|
||||
|
||||
export const RadialResult = ({module, score, total, png}: ModuleScore) => (
|
||||
<View style={[styles.textFont, styles.radialContainer]}>
|
||||
<Text style={[styles.textColor, styles.textBold, {fontSize: 10}]}>{module}</Text>
|
||||
<Image src={png} style={styles.image64}></Image>
|
||||
<View style={[styles.textColor, styles.radialResultContainer]}>
|
||||
<Text style={styles.textBold}>{Math.floor(score)}</Text>
|
||||
<Text style={styles.textBold}>{calculateBandScore(score, total, module, "academic")}</Text>
|
||||
<Text style={{fontSize: 8}}>out of 9.0</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user