определение домена для шильдика и параметры href

This commit is contained in:
Nastya 2024-03-30 12:52:02 +03:00
parent 84d63b9302
commit 611b0282d3
3 changed files with 11 additions and 5 deletions

@ -324,7 +324,9 @@ export const ContactForm = ({currentQuestion, onShowResult}: Props) => {
<Box <Box
component={Link} component={Link}
target={"_blank"} target={"_blank"}
href={"https://quiz.pena.digital"} href={
`https://${window.location.hostname.includes("s") ? "s" : ""}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`
}
sx={{ sx={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",

@ -23,7 +23,7 @@ export const ResultForm = ({resultQuestion}: ResultFormProps) => {
const theme = useTheme(); const theme = useTheme();
const isMobile = useRootContainerSize() < 650; const isMobile = useRootContainerSize() < 650;
const isTablet = useRootContainerSize() < 1000; const isTablet = useRootContainerSize() < 1000;
const {settings, show_badge} = useQuizData(); const {settings, show_badge, quizId} = useQuizData();
const spec = settings.cfg.spec const spec = settings.cfg.spec
console.log(quizThemes[settings.cfg.theme].isLight) console.log(quizThemes[settings.cfg.theme].isLight)
@ -190,7 +190,9 @@ export const ResultForm = ({resultQuestion}: ResultFormProps) => {
<Box <Box
component={Link} component={Link}
target={"_blank"} target={"_blank"}
href={"https://quiz.pena.digital"} href={
`https://${window.location.hostname.includes("s") ? "s" : ""}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`
}
sx={{ sx={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",

@ -25,7 +25,7 @@ import PenaLogo from "@icons/PenaLogo.png";
export const StartPageViewPublication = () => { export const StartPageViewPublication = () => {
const theme = useTheme(); const theme = useTheme();
const { settings, show_badge } = useQuizData(); const { settings, show_badge, quizId } = useQuizData();
const { isMobileDevice } = useUADevice(); const { isMobileDevice } = useUADevice();
const isMobile = useRootContainerSize() < 700; const isMobile = useRootContainerSize() < 700;
const isTablet = useRootContainerSize() < 800; const isTablet = useRootContainerSize() < 800;
@ -330,7 +330,9 @@ export const StartPageViewPublication = () => {
<Box <Box
component={Link} component={Link}
target={"_blank"} target={"_blank"}
href={"https://quiz.pena.digital"} href={
`https://${window.location.hostname.includes("s") ? "s" : ""}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`
}
sx={{ sx={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",