Updated and fixed part of the partial test generation

This commit is contained in:
Tiago Ribeiro
2024-01-23 11:45:32 +00:00
parent 74d3f30c93
commit bd0fab4c8f
8 changed files with 21 additions and 11 deletions

View File

@@ -46,6 +46,6 @@ export const getExams = async (
};
const filterByVariant = (exams: Exam[], variant?: Variant) => {
const filtered = variant && variant === "partial" ? exams.filter((x) => x.variant === "partial") : exams;
const filtered = variant && variant === "partial" ? exams.filter((x) => x.variant === "partial") : exams.filter((x) => x.variant !== "partial");
return filtered.length > 0 ? filtered : exams;
};

View File

@@ -1,6 +1,6 @@
import {Howl, Howler} from "howler";
export type Sound = "check" | "sent";
export type Sound = "check" | "sent" | "error";
export const playSound = (path: Sound) => {
const sound = new Howl({
src: [`audio/${path}.mp3`],