From 87e9864290e24e0ccab5a7cbc6db628945fd3c25 Mon Sep 17 00:00:00 2001 From: RandyJC Date: Mon, 8 Dec 2025 13:35:52 +0100 Subject: [PATCH] fixed issue witn npmn --- config/quizz/example.json | 18 +----------------- .../web/src/components/game/QuestionMedia.tsx | 4 ++-- .../src/components/game/create/QuizEditor.tsx | 2 +- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/config/quizz/example.json b/config/quizz/example.json index 37d3051..9ab200a 100644 --- a/config/quizz/example.json +++ b/config/quizz/example.json @@ -11,7 +11,7 @@ ], "media": { "type": "audio", - "url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/4/4c/Beethoven_Moonlight_1st_movement.ogg/Beethoven_Moonlight_1st_movement.ogg.mp3" + "url": "https://file-examples.com/storage/fee95f49ad692e9489b0fab/2017/11/file_example_WAV_1MG.wav" }, "solution": 1, "cooldown": 5, @@ -32,22 +32,6 @@ "solution": 3, "cooldown": 5, "time": 60 - }, - { - "question": "What kind of animal is featured here?", - "answers": [ - "Dolphin", - "Panda", - "Horse", - "Penguin" - ], - "media": { - "type": "youtube", - "url": "https://www.youtube.com/watch?v=2k1qW3D0q6c" - }, - "solution": 2, - "cooldown": 5, - "time": 40 } ] } \ No newline at end of file diff --git a/packages/web/src/components/game/QuestionMedia.tsx b/packages/web/src/components/game/QuestionMedia.tsx index 396f554..f8ec49d 100644 --- a/packages/web/src/components/game/QuestionMedia.tsx +++ b/packages/web/src/components/game/QuestionMedia.tsx @@ -1,6 +1,6 @@ "use client" -import { QuestionMedia } from "@rahoot/common/types/game" +import type { QuestionMedia as QuestionMediaType } from "@rahoot/common/types/game" import clsx from "clsx" import { useEffect, useMemo, useRef, useState } from "react" @@ -80,7 +80,7 @@ const extractYoutubeId = (url: string) => { } type Props = { - media?: QuestionMedia + media?: QuestionMediaType alt: string onPlayChange?: (_playing: boolean) => void } diff --git a/packages/web/src/components/game/create/QuizEditor.tsx b/packages/web/src/components/game/create/QuizEditor.tsx index 5e76380..ce8978d 100644 --- a/packages/web/src/components/game/create/QuizEditor.tsx +++ b/packages/web/src/components/game/create/QuizEditor.tsx @@ -1,6 +1,6 @@ "use client" -import { QuestionMedia, QuizzWithId } from "@rahoot/common/types/game" +import type { QuestionMedia, QuizzWithId } from "@rahoot/common/types/game" import Button from "@rahoot/web/components/Button" import Input from "@rahoot/web/components/Input" import { useEvent, useSocket } from "@rahoot/web/contexts/socketProvider"