mirror of
https://github.com/originalmk/skrytka-app.git
synced 2025-01-18 16:29:17 +00:00
deletion of redundant files, semicolon and small fixes
This commit is contained in:
parent
25d65b2db4
commit
ed2ba3ebdc
@ -1,6 +1,5 @@
|
||||
import { TruckId } from "./Truck";
|
||||
import { AppContext } from './AppContext';
|
||||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import React, {useEffect} from 'react';
|
||||
import { ButtonShowCorrectAnswer } from "./GetImageAndQuestion";
|
||||
export let EndCacheId = "";
|
||||
export let EndCorrectAnswer = "";
|
||||
@ -8,7 +7,6 @@ export let EndCorrectAnswer = "";
|
||||
|
||||
const FetchData = ({isClick,score,setIsClick,setScore,navigate}) => {
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
fetch(`/random-question?fire-truck=${TruckId}`)
|
||||
.then(res => res.json())
|
||||
@ -16,12 +14,13 @@ const FetchData = ({isClick,score,setIsClick,setScore,navigate}) => {
|
||||
if(isClick){
|
||||
const propertValuesObjectFromDb = Object.values(dataQuestion);
|
||||
EndCorrectAnswer = propertValuesObjectFromDb[1];
|
||||
|
||||
EndCacheId = propertValuesObjectFromDb[0];
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
@ -40,7 +39,13 @@ const FetchData = ({isClick,score,setIsClick,setScore,navigate}) => {
|
||||
|
||||
export const QuizGetQuestion = ({score,isClick,setScore,setIsClick,navigate}) => {
|
||||
return (
|
||||
<FetchData score = {score} isClick = {isClick} setScore = {setScore} setIsClick = {setIsClick} navigate = {navigate}/>
|
||||
<FetchData
|
||||
score = {score}
|
||||
isClick = {isClick}
|
||||
setScore = {setScore}
|
||||
setIsClick = {setIsClick}
|
||||
navigate = {navigate}
|
||||
/>
|
||||
)
|
||||
|
||||
}
|
@ -48,7 +48,7 @@ const Result = () => {
|
||||
textColor : 'black' ,
|
||||
trailColor : '#c6c4c4' ,
|
||||
backgroundColor : '#d42436' ,
|
||||
} ) } />;
|
||||
} ) } />
|
||||
</div>
|
||||
|
||||
<h3 className='textDependsEndScore'>{{endScore}/10 < 9 ? "Jesteś szybki.. ale pożar jest szybszy" : "Brawo udało ci się ugasić pożar !!!"}</h3>
|
||||
|
@ -1,6 +0,0 @@
|
||||
const Player = ({ url }) => {
|
||||
const audio = new Audio(url);
|
||||
const play = audio.play();
|
||||
};
|
||||
|
||||
export default Player;
|
Loading…
x
Reference in New Issue
Block a user