Renamed to setup for group testing

This commit is contained in:
Joao Ramos
2024-01-08 22:19:48 +00:00
parent cd8860f6ac
commit 2540398ab0
3 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,33 @@
/* eslint-disable jsx-a11y/alt-text */
import React from "react";
import { Document, Page, View, Text, Image } from "@react-pdf/renderer";
import { styles } from "./styles";
import { StyleSheet } from "@react-pdf/renderer";
interface Props {
// date: string;
// name: string;
// email: string;
// id: string;
// gender?: string;
// testDetails: ModuleScore[];
// summary: string;
// logo: string;
// qrcode: string;
// renderDetails: React.ReactNode;
// title: string;
}
const GroupTestReport = ({}: Props) => {
return (
<Document>
<Page style={styles.body}>
<View></View>
</Page>
</Document>
);
};
export default GroupTestReport;

View File

@@ -32,7 +32,7 @@ interface Props {
title: string;
}
const PDFReport = ({
const TestReport = ({
title,
date,
name,
@@ -218,4 +218,4 @@ const PDFReport = ({
);
};
export default PDFReport;
export default TestReport;

View File

@@ -13,7 +13,7 @@ import {
import { withIronSessionApiRoute } from "iron-session/next";
import { sessionOptions } from "@/lib/session";
import ReactPDF from "@react-pdf/renderer";
import PDFReport from "@/exams/pdf";
import TestReport from "@/exams/pdf/test.report";
import { ref, uploadBytes } from "firebase/storage";
import { Stat } from "@/interfaces/user";
import { User } from "@/interfaces/user";
@@ -337,7 +337,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
const { title, details } = getCustomData();
const pdfStream = await ReactPDF.renderToStream(
<PDFReport
<TestReport
title={title}
date={new Date(stat.date).toLocaleString()}
name={user.name}