отображение шильдика
This commit is contained in:
parent
02041e2f88
commit
931b59a384
@ -28,7 +28,7 @@ type Props = {
|
||||
|
||||
export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
const theme = useTheme();
|
||||
const { settings, questions, quizId } = useQuizData();
|
||||
const { settings, questions, quizId, show_badge } = useQuizData();
|
||||
|
||||
const [ready, setReady] = useState(false);
|
||||
const [name, setName] = useState("");
|
||||
@ -274,6 +274,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
 ознакомлен
|
||||
</Typography>
|
||||
</Box>
|
||||
{!show_badge &&
|
||||
<Box
|
||||
component={Link}
|
||||
target={"_blank"}
|
||||
@ -302,6 +303,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
Сделано на PenaQuiz
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
@ -36,7 +36,7 @@ export const Question = ({
|
||||
prevButton,
|
||||
}: Props) => {
|
||||
const theme = useTheme();
|
||||
const { settings } = useQuizData();
|
||||
const { settings, show_badge } = useQuizData();
|
||||
console.log(currentQuestionStepNumber)
|
||||
return (
|
||||
<Box sx={{
|
||||
@ -55,7 +55,8 @@ export const Question = ({
|
||||
justifyContent: "space-between"
|
||||
}}>
|
||||
<QuestionByType key={currentQuestion.id} question={currentQuestion} stepNumber={currentQuestionStepNumber} />
|
||||
{quizThemes[settings.cfg.theme].isLight ? (
|
||||
|
||||
{!show_badge ? (quizThemes[settings.cfg.theme].isLight ? (
|
||||
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||
<NameplateLogoFQ style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||
</Link>
|
||||
@ -63,8 +64,8 @@ export const Question = ({
|
||||
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||
<NameplateLogoFQDark style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||
</Link>
|
||||
)) : <></>}
|
||||
|
||||
)}
|
||||
</Box>
|
||||
<Footer
|
||||
stepNumber={currentQuestionStepNumber}
|
||||
|
@ -22,7 +22,7 @@ type ResultFormProps = {
|
||||
export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
||||
const theme = useTheme();
|
||||
const isMobile = useRootContainerSize() < 650;
|
||||
const { settings } = useQuizData();
|
||||
const { settings, show_badge } = useQuizData();
|
||||
const spec = settings.cfg.spec
|
||||
|
||||
return (
|
||||
@ -124,6 +124,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
||||
px: "20px",
|
||||
}}
|
||||
>
|
||||
{!show_badge &&
|
||||
<Box
|
||||
component={Link}
|
||||
target={"_blank"}
|
||||
@ -153,6 +154,8 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
||||
Сделано на PenaQuiz
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
|
@ -13,7 +13,7 @@ import { setCurrentQuizStep } from "@stores/quizView";
|
||||
|
||||
export const StartPageViewPublication = () => {
|
||||
const theme = useTheme();
|
||||
const { settings } = useQuizData();
|
||||
const { settings, show_badge } = useQuizData();
|
||||
const { isMobileDevice } = useUADevice();
|
||||
const isMobile = useRootContainerSize() < 650;
|
||||
const isTablet = useRootContainerSize() < 800;
|
||||
@ -240,6 +240,7 @@ export const StartPageViewPublication = () => {
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
{!show_badge &&
|
||||
<Box
|
||||
component={Link}
|
||||
target={"_blank"}
|
||||
@ -256,6 +257,8 @@ export const StartPageViewPublication = () => {
|
||||
Сделано на PenaQuiz
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
|
||||
</Box>
|
||||
</>
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ export interface GetQuizDataResponse {
|
||||
p: number;
|
||||
c: string;
|
||||
}[];
|
||||
show_badge: boolean;
|
||||
}
|
||||
|
||||
export function parseQuizData(quizDataResponse: GetQuizDataResponse): Omit<QuizSettings, "recentlyCompleted"> {
|
||||
@ -50,5 +51,5 @@ export function parseQuizData(quizDataResponse: GetQuizDataResponse): Omit<QuizS
|
||||
pausable: quizDataResponse.settings.pausable
|
||||
};
|
||||
|
||||
return { cnt: quizDataResponse.cnt, settings, questions: items };
|
||||
return { cnt: quizDataResponse.cnt, settings, questions: items, show_badge: quizDataResponse.show_badge };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user