Merge branch 'quiz-gallery' into dev

This commit is contained in:
Nastya 2024-05-20 21:15:36 +03:00
commit 700a3da36c
133 changed files with 1413 additions and 517 deletions

@ -1,12 +1,16 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8" />
<head> <title>Pena Quiz</title>
<meta charset="utf-8" /> <meta
name="description"
<title>Pena Quiz</title> content="Веб-сервис с инструментами для повышения эффективности маркетологов."
<meta name="description" content="Веб-сервис с инструментами для повышения эффективности маркетологов." /> />
<meta name="keywords" content=" Экосистема маркетинговых инструментов, <meta
name="keywords"
content=" Экосистема маркетинговых инструментов,
Инструменты для социальных исследований, Инструменты для социальных исследований,
Малый бизнес, Малый бизнес,
Маркетинговые инструменты, Маркетинговые инструменты,
@ -26,82 +30,140 @@
Анализ данных, Анализ данных,
Улучшение результатов, Улучшение результатов,
Увеличение прибыли, Увеличение прибыли,
Повышение конкурентоспособности " /> Повышение конкурентоспособности "
/>
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" sizes="any" /><!-- 32×32 --> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" sizes="any" />
<link rel="icon" href="%PUBLIC_URL%/favicon.svg" type="image/svg+xml" /> <!-- 32×32 -->
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.png" /><!-- 180×180 --> <link rel="icon" href="%PUBLIC_URL%/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.png" />
<!-- 180×180 -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" />
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap" rel="stylesheet" /> <link
<!-- Yandex.Metrika counter --> href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap"
<script type="text/javascript"> rel="stylesheet"
(function (m, e, t, r, i, k, a) { />
m[i] = m[i] || function () { (m[i].a = m[i].a || []).push(arguments) }; <!-- Yandex.Metrika counter -->
m[i].l = 1 * new Date(); <script type="text/javascript">
for (var j = 0; j < document.scripts.length; j++) { if (document.scripts[j].src === r) { return; } } (function (m, e, t, r, i, k, a) {
k = e.createElement(t), a = e.getElementsByTagName(t)[0], k.async = 1, k.src = r, a.parentNode.insertBefore(k, a) m[i] =
}) m[i] ||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); function () {
(m[i].a = m[i].a || []).push(arguments);
};
m[i].l = 1 * new Date();
for (var j = 0; j < document.scripts.length; j++) {
if (document.scripts[j].src === r) {
return;
}
}
(k = e.createElement(t)),
(a = e.getElementsByTagName(t)[0]),
(k.async = 1),
(k.src = r),
a.parentNode.insertBefore(k, a);
})(
window,
document,
"script",
"https://mc.yandex.ru/metrika/tag.js",
"ym",
);
const domain = location.hostname const domain = location.hostname;
if (domain === "quiz.pena.digital") { if (domain === "quiz.pena.digital") {
ym(96979576, "init", { ym(96979576, "init", {
clickmap: true, clickmap: true,
trackLinks: true, trackLinks: true,
accurateTrackBounce: true, accurateTrackBounce: true,
webvisor: true webvisor: true,
}); });
// <!-- Top.Mail.Ru counter --> // <!-- Top.Mail.Ru counter -->
var _tmr = window._tmr || (window._tmr = []); var _tmr = window._tmr || (window._tmr = []);
_tmr.push({ id: "3513005", type: "pageView", start: (new Date()).getTime() }); _tmr.push({
(function (d, w, id) { id: "3513005",
if (d.getElementById(id)) return; type: "pageView",
var ts = d.createElement("script"); ts.type = "text/javascript"; ts.async = true; ts.id = id; start: new Date().getTime(),
ts.src = "https://top-fwz1.mail.ru/js/code.js"; });
var f = function () { var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ts, s); }; (function (d, w, id) {
if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } if (d.getElementById(id)) return;
})(document, window, "tmr-code"); var ts = d.createElement("script");
// <!-- /Top.Mail.Ru counter --> ts.type = "text/javascript";
ts.async = true;
}; ts.id = id;
if (domain === "squiz.pena.digital") { ts.src = "https://top-fwz1.mail.ru/js/code.js";
ym(96979625, "init", { var f = function () {
clickmap: true, var s = d.getElementsByTagName("script")[0];
trackLinks: true, s.parentNode.insertBefore(ts, s);
accurateTrackBounce: true, };
webvisor: true if (w.opera == "[object Opera]") {
}); d.addEventListener("DOMContentLoaded", f, false);
}; } else {
if (domain === "penaquiz.online" || domain === "penaquiz.ru") { f();
ym(97241101, "init", { }
clickmap: true, })(document, window, "tmr-code");
trackLinks: true, // <!-- /Top.Mail.Ru counter -->
accurateTrackBounce: true, }
webvisor: true if (domain === "squiz.pena.digital") {
}); ym(96979625, "init", {
}; clickmap: true,
trackLinks: true,
</script> accurateTrackBounce: true,
<noscript> webvisor: true,
<div><img src="https://mc.yandex.ru/watch/96979576" style="position:absolute; left:-9999px;" alt="" /></div> });
<div><img src="https://mc.yandex.ru/watch/96979625" style="position:absolute; left:-9999px;" alt="" /></div> }
<div><img src="https://mc.yandex.ru/watch/97241101" style="position:absolute; left:-9999px;" alt="" /></div> if (domain === "penaquiz.online" || domain === "penaquiz.ru") {
<div><img src="https://top-fwz1.mail.ru/counter?id=3513005;js=na" style="position:absolute;left:-9999px;" alt="Top.Mail.Ru" /></div> ym(97241101, "init", {
</noscript> clickmap: true,
<!-- /Yandex.Metrika counter --> trackLinks: true,
</head> accurateTrackBounce: true,
webvisor: true,
<body> });
<noscript>You need to enable JavaScript to run this app.</noscript> }
<div id="root"></div> </script>
</body> <noscript>
<div>
<img
src="https://mc.yandex.ru/watch/96979576"
style="position: absolute; left: -9999px"
alt=""
/>
</div>
<div>
<img
src="https://mc.yandex.ru/watch/96979625"
style="position: absolute; left: -9999px"
alt=""
/>
</div>
<div>
<img
src="https://mc.yandex.ru/watch/97241101"
style="position: absolute; left: -9999px"
alt=""
/>
</div>
<div>
<img
src="https://top-fwz1.mail.ru/counter?id=3513005;js=na"
style="position: absolute; left: -9999px"
alt="Top.Mail.Ru"
/>
</div>
</noscript>
<!-- /Yandex.Metrika counter -->
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html> </html>

@ -43,6 +43,7 @@ import { useUserAccountFetcher } from "@utils/hooks/useUserAccountFetcher";
const MyQuizzesFull = lazy(() => import("./pages/createQuize/MyQuizzesFull")); const MyQuizzesFull = lazy(() => import("./pages/createQuize/MyQuizzesFull"));
const QuizGallery = lazy(() => import("./pages/createQuize/QuizGallery"));
const ViewPage = lazy(() => import("./pages/ViewPublicationPage")); const ViewPage = lazy(() => import("./pages/ViewPublicationPage"));
const Analytics = lazy(() => import("./pages/Analytics/Analytics")); const Analytics = lazy(() => import("./pages/Analytics/Analytics"));
const EditPage = lazy(() => import("./pages/startPage/EditPage")); const EditPage = lazy(() => import("./pages/startPage/EditPage"));
@ -201,6 +202,10 @@ export default function App() {
/> />
} }
/> />
<Route
path="/gallery"
element={<LazyLoading children={<QuizGallery />} />}
/>
<Route <Route
path="/list" path="/list"
element={<LazyLoading children={<MyQuizzesFull />} />} element={<LazyLoading children={<MyQuizzesFull />} />}

@ -164,6 +164,28 @@ export const addQuizImages = async (
} }
}; };
export const copyQuizTemplate = async (
qid: string,
): Promise<[number | null, string?]> => {
try {
const { id } = await makeRequest<{ Qid: string }, { id: number }>({
method: "POST",
url: `${API_URL}/quiz/template`,
body: { Qid: qid },
});
if (!id) {
return [null, `Не удалось скопировать шаблон квиза.`];
}
return [id];
} catch (nativeError) {
const [error] = parseAxiosError(nativeError);
return [null, `Не удалось скопировать шаблон квиза. ${error}`];
}
};
export const quizApi = { export const quizApi = {
create: createQuiz, create: createQuiz,
getList: getQuizList, getList: getQuizList,
@ -172,6 +194,7 @@ export const quizApi = {
copy: copyQuiz, copy: copyQuiz,
delete: deleteQuiz, delete: deleteQuiz,
addImages: addQuizImages, addImages: addQuizImages,
copyTemplate: copyQuizTemplate,
}; };
const defaultCreateQuizBody: CreateQuizRequest = { const defaultCreateQuizBody: CreateQuizRequest = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Some files were not shown because too many files have changed in this diff Show More