diff --git a/src/App.tsx b/src/App.tsx
index d40933cc..bf1eaa38 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -38,12 +38,12 @@ import { isAxiosError } from "axios";
import RecoverPassword from "./pages/auth/RecoverPassword";
import { InfoPrivilege } from "./pages/InfoPrivilege";
import OutdatedLink from "./pages/auth/OutdatedLink";
-import QuizGallery from "./pages/createQuize/QuizGallery";
import { useAfterpay } from "@utils/hooks/useAfterpay";
import { useUserAccountFetcher } from "@utils/hooks/useUserAccountFetcher";
const MyQuizzesFull = lazy(() => import("./pages/createQuize/MyQuizzesFull"));
+const QuizGallery = lazy(() => import("./pages/createQuize/QuizGallery"));
const ViewPage = lazy(() => import("./pages/ViewPublicationPage"));
const Analytics = lazy(() => import("./pages/Analytics/Analytics"));
const EditPage = lazy(() => import("./pages/startPage/EditPage"));
@@ -202,7 +202,10 @@ export default function App() {
/>
}
/>
- } />
+ } />}
+ />
} />}
diff --git a/src/api/quiz.ts b/src/api/quiz.ts
index e6d05a3d..c216f362 100644
--- a/src/api/quiz.ts
+++ b/src/api/quiz.ts
@@ -164,6 +164,24 @@ export const addQuizImages = async (
}
};
+export const copyQuizTemplate = async (
+ qid: string,
+): Promise<[string | null, string?]> => {
+ try {
+ const copyQuizTemplateResult = await makeRequest<{ Qid: string }, string>({
+ method: "POST",
+ url: `${API_URL}/quiz/template`,
+ body: { Qid: qid },
+ });
+
+ return [copyQuizTemplateResult];
+ } catch (nativeError) {
+ const [error] = parseAxiosError(nativeError);
+
+ return [null, `Не удалось скопировать шаблон квиза. ${error}`];
+ }
+};
+
export const quizApi = {
create: createQuiz,
getList: getQuizList,
@@ -172,6 +190,7 @@ export const quizApi = {
copy: copyQuiz,
delete: deleteQuiz,
addImages: addQuizImages,
+ copyTemplate: copyQuizTemplate,
};
const defaultCreateQuizBody: CreateQuizRequest = {
diff --git a/src/assets/quiz-templates/quiz-template-1.png b/src/assets/quiz-templates/quiz-template-1.png
deleted file mode 100644
index 0703b74a..00000000
Binary files a/src/assets/quiz-templates/quiz-template-1.png and /dev/null differ
diff --git a/src/assets/quiz-templates/quiz-template-2.png b/src/assets/quiz-templates/quiz-template-2.png
deleted file mode 100644
index f92c8c6b..00000000
Binary files a/src/assets/quiz-templates/quiz-template-2.png and /dev/null differ
diff --git a/src/assets/quiz-templates/quiz-template-3.png b/src/assets/quiz-templates/quiz-template-3.png
deleted file mode 100644
index 8bb8e8c3..00000000
Binary files a/src/assets/quiz-templates/quiz-template-3.png and /dev/null differ
diff --git a/src/assets/quiz-templates/quiz-template-4.png b/src/assets/quiz-templates/quiz-template-4.png
deleted file mode 100644
index 11ecf89f..00000000
Binary files a/src/assets/quiz-templates/quiz-template-4.png and /dev/null differ
diff --git a/src/assets/quiz-templates/quiz-template-5.png b/src/assets/quiz-templates/quiz-template-5.png
deleted file mode 100644
index 4cbde4e2..00000000
Binary files a/src/assets/quiz-templates/quiz-template-5.png and /dev/null differ
diff --git a/src/assets/quiz-templates/quiz-template-6.png b/src/assets/quiz-templates/quiz-template-6.png
deleted file mode 100644
index 0308e86f..00000000
Binary files a/src/assets/quiz-templates/quiz-template-6.png and /dev/null differ
diff --git a/src/assets/quiz-templates/services/service-1.jpg b/src/assets/quiz-templates/services/service-1.jpg
new file mode 100644
index 00000000..51a36fb4
Binary files /dev/null and b/src/assets/quiz-templates/services/service-1.jpg differ
diff --git a/src/assets/quiz-templates/services/service-10.jpg b/src/assets/quiz-templates/services/service-10.jpg
new file mode 100644
index 00000000..a2303dff
Binary files /dev/null and b/src/assets/quiz-templates/services/service-10.jpg differ
diff --git a/src/assets/quiz-templates/services/service-11.jpg b/src/assets/quiz-templates/services/service-11.jpg
new file mode 100644
index 00000000..15111b28
Binary files /dev/null and b/src/assets/quiz-templates/services/service-11.jpg differ
diff --git a/src/assets/quiz-templates/services/service-2.jpg b/src/assets/quiz-templates/services/service-2.jpg
new file mode 100644
index 00000000..08140977
Binary files /dev/null and b/src/assets/quiz-templates/services/service-2.jpg differ
diff --git a/src/assets/quiz-templates/services/service-3.jpg b/src/assets/quiz-templates/services/service-3.jpg
new file mode 100644
index 00000000..96b87209
Binary files /dev/null and b/src/assets/quiz-templates/services/service-3.jpg differ
diff --git a/src/assets/quiz-templates/services/service-4.jpg b/src/assets/quiz-templates/services/service-4.jpg
new file mode 100644
index 00000000..a04654e3
Binary files /dev/null and b/src/assets/quiz-templates/services/service-4.jpg differ
diff --git a/src/assets/quiz-templates/services/service-5.jpg b/src/assets/quiz-templates/services/service-5.jpg
new file mode 100644
index 00000000..8879f78e
Binary files /dev/null and b/src/assets/quiz-templates/services/service-5.jpg differ
diff --git a/src/assets/quiz-templates/services/service-6.jpg b/src/assets/quiz-templates/services/service-6.jpg
new file mode 100644
index 00000000..aabcbbe4
Binary files /dev/null and b/src/assets/quiz-templates/services/service-6.jpg differ
diff --git a/src/assets/quiz-templates/services/service-7.jpg b/src/assets/quiz-templates/services/service-7.jpg
new file mode 100644
index 00000000..2abf2b63
Binary files /dev/null and b/src/assets/quiz-templates/services/service-7.jpg differ
diff --git a/src/assets/quiz-templates/services/service-8.jpg b/src/assets/quiz-templates/services/service-8.jpg
new file mode 100644
index 00000000..20d3bb74
Binary files /dev/null and b/src/assets/quiz-templates/services/service-8.jpg differ
diff --git a/src/assets/quiz-templates/services/service-9.jpg b/src/assets/quiz-templates/services/service-9.jpg
new file mode 100644
index 00000000..26556403
Binary files /dev/null and b/src/assets/quiz-templates/services/service-9.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-1.jpg b/src/assets/quiz-templates/tourism/tourism-1.jpg
new file mode 100644
index 00000000..f4c788be
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-1.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-10.jpg b/src/assets/quiz-templates/tourism/tourism-10.jpg
new file mode 100644
index 00000000..c11ab435
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-10.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-2.jpg b/src/assets/quiz-templates/tourism/tourism-2.jpg
new file mode 100644
index 00000000..c6628bc7
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-2.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-3.jpg b/src/assets/quiz-templates/tourism/tourism-3.jpg
new file mode 100644
index 00000000..895d366c
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-3.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-4.jpg b/src/assets/quiz-templates/tourism/tourism-4.jpg
new file mode 100644
index 00000000..863b593f
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-4.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-5.jpg b/src/assets/quiz-templates/tourism/tourism-5.jpg
new file mode 100644
index 00000000..86913e09
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-5.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-6.jpg b/src/assets/quiz-templates/tourism/tourism-6.jpg
new file mode 100644
index 00000000..40912313
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-6.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-7.jpg b/src/assets/quiz-templates/tourism/tourism-7.jpg
new file mode 100644
index 00000000..25efa443
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-7.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-8.jpg b/src/assets/quiz-templates/tourism/tourism-8.jpg
new file mode 100644
index 00000000..a76a4437
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-8.jpg differ
diff --git a/src/assets/quiz-templates/tourism/tourism-9.jpg b/src/assets/quiz-templates/tourism/tourism-9.jpg
new file mode 100644
index 00000000..7db92d83
Binary files /dev/null and b/src/assets/quiz-templates/tourism/tourism-9.jpg differ
diff --git a/src/pages/createQuize/QuizGallery/QuizTemplateCard.tsx b/src/pages/createQuize/QuizGallery/QuizTemplateCard.tsx
index 04bc43c5..50bae248 100644
--- a/src/pages/createQuize/QuizGallery/QuizTemplateCard.tsx
+++ b/src/pages/createQuize/QuizGallery/QuizTemplateCard.tsx
@@ -5,25 +5,30 @@ import { enqueueSnackbar } from "notistack";
import { quizApi } from "@/api/quiz";
import { setEditQuizId } from "@root/quizes/actions";
-interface Props {
- image: string;
- quizId: number;
+import type { Template } from "./Template";
+
+interface QuizTemplateCardProps {
+ category: string;
+ template: Template;
}
-export default function QuizTemplateCard({ image, quizId }: Props) {
+export const QuizTemplateCard = ({
+ category,
+ template: { quizId, title, picture, categoryDescription },
+}: QuizTemplateCardProps) => {
const navigate = useNavigate();
const theme = useTheme();
const isTablet = useMediaQuery(theme.breakpoints.down("md"));
const copyTemplate = async () => {
- try {
- const { updated } = await quizApi.copy(quizId);
+ const [copiedQuizId, copyError] = await quizApi.copyTemplate(quizId);
- setEditQuizId(updated);
- navigate("/edit");
- } catch {
- enqueueSnackbar("Ошибка создания квиза");
+ if (copyError || !copiedQuizId) {
+ return enqueueSnackbar(copyError);
}
+
+ setEditQuizId(0);
+ navigate("/edit");
};
return (
@@ -49,10 +54,8 @@ export default function QuizTemplateCard({ image, quizId }: Props) {
-
+ {categoryDescription && (
+
+ )}
-
- Название шаблона
+
+ {title}
);
-}
+};
diff --git a/src/pages/createQuize/QuizGallery/SearchTemplate.tsx b/src/pages/createQuize/QuizGallery/SearchTemplate.tsx
new file mode 100644
index 00000000..2b58e590
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/SearchTemplate.tsx
@@ -0,0 +1,21 @@
+import { FormControl } from "@mui/material";
+
+import CustomTextField from "@ui_kit/CustomTextField";
+
+type SearchTemplateProps = {
+ searchValue: string;
+ setSearchValue: (value: string) => void;
+};
+
+export const SearchTemplate = ({
+ searchValue,
+ setSearchValue,
+}: SearchTemplateProps) => (
+
+ setSearchValue(target.value)}
+ />
+
+);
diff --git a/src/pages/createQuize/QuizGallery/SelectCategory.tsx b/src/pages/createQuize/QuizGallery/SelectCategory.tsx
new file mode 100644
index 00000000..426c3e3a
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/SelectCategory.tsx
@@ -0,0 +1,71 @@
+import { FormControl, InputLabel, MenuItem, Select } from "@mui/material";
+
+import ArrowDown from "@icons/ArrowDownIcon";
+
+import type { CategoryType } from "./Template";
+
+const CATEGORIES = [
+ { categoryType: "All", category: "Все" },
+ { categoryType: "Tourism", category: "Туризм" },
+ { categoryType: "Services", category: "Услуги" },
+ { categoryType: "RealEstate", category: "Недвижимость" },
+ { categoryType: "Auto", category: "Авто" },
+ { categoryType: "Health", category: "Здоровье и уход" },
+ { categoryType: "Research", category: "Исследовательские" },
+ { categoryType: "Production", category: "Производство" },
+ { categoryType: "Repair", category: "Ремонт" },
+ { categoryType: "Education", category: "Образование" },
+] as const;
+
+type SelectCategoryProps = {
+ categoryType: CategoryType | "All";
+ setCategoryType: (categoryType: CategoryType) => void;
+};
+
+export const SelectCategory = ({
+ categoryType,
+ setCategoryType,
+}: SelectCategoryProps) => (
+
+
+ Категории
+
+
+
+);
diff --git a/src/pages/createQuize/QuizGallery/Template.tsx b/src/pages/createQuize/QuizGallery/Template.tsx
index f0c69857..f12254d0 100644
--- a/src/pages/createQuize/QuizGallery/Template.tsx
+++ b/src/pages/createQuize/QuizGallery/Template.tsx
@@ -1,17 +1,37 @@
import { Box, Typography, useTheme, useMediaQuery } from "@mui/material";
-import QuizTemplateCard from "./QuizTemplateCard";
+import { QuizTemplateCard } from "./QuizTemplateCard";
+
+export type CategoryType =
+ | "Tourism"
+ | "Services"
+ | "RealEstate"
+ | "Auto"
+ | "Health"
+ | "Research"
+ | "Production"
+ | "Repair"
+ | "Education";
export type Template = {
+ quizId: string;
picture: string;
- quizId: number;
+ title: string;
+ categoryDescription?: string;
+};
+
+export type Category = {
+ category: string;
+ categoryType: CategoryType;
+ templates: Template[];
};
type TemplateProps = {
- title: string;
- items: Template[];
+ template: Category;
};
-export const Template = ({ title, items }: TemplateProps) => {
+export const Template = ({
+ template: { category, templates },
+}: TemplateProps) => {
const theme = useTheme();
const isSmallMonitor = useMediaQuery(theme.breakpoints.down(1100));
const isTablet = useMediaQuery(theme.breakpoints.down("md"));
@@ -21,7 +41,7 @@ export const Template = ({ title, items }: TemplateProps) => {
- {title}
+ {category}
{
mb: "0px",
}}
/>
- ({items.length})
+ ({templates.length})
{
justifyContent: isTablet ? "center" : "normal",
}}
>
- {items.map(({ picture, quizId }) => (
-
+ {templates.map((template) => (
+
))}
>
diff --git a/src/pages/createQuize/QuizGallery/index.tsx b/src/pages/createQuize/QuizGallery/index.tsx
index a012ebf9..79fb23a2 100644
--- a/src/pages/createQuize/QuizGallery/index.tsx
+++ b/src/pages/createQuize/QuizGallery/index.tsx
@@ -1,36 +1,41 @@
-import { useState } from "react";
-import {
- Box,
- Button,
- FormControl,
- InputAdornment,
- InputLabel,
- MenuItem,
- Select,
- TextField,
- Typography,
- useTheme,
-} from "@mui/material";
+import { useState, useMemo } from "react";
+import { Box, Button, Typography, useTheme } from "@mui/material";
import ComplexNavText from "../ComplexNavText";
-import { TourismTemplate } from "./templates/Tourism";
-import { PoolsTemplate } from "./templates/Polls";
+import { SearchTemplate } from "./SearchTemplate";
+import { SelectCategory } from "./SelectCategory";
+import { TEMPLATES } from "./templates";
+import { Template } from "./Template";
-import SearchIcon from "@icons/SearchIcon";
import SectionWrapper from "@ui_kit/SectionWrapper";
-import ArrowDown from "@icons/ArrowDownIcon";
-const categories = [
- "Категория 1",
- "Категория 2",
- "Категория 3",
- "Категория 4",
-] as const;
-
-type Category = (typeof categories)[number];
+import type { Category, CategoryType } from "./Template";
export default function QuizGallery() {
- const theme = useTheme();
- const [category, setCategory] = useState("");
+ const [searchValue, setSearchValue] = useState("");
+ const [categoryType, setCategoryType] = useState("All");
+
+ const filteredTemplates = useMemo(
+ () =>
+ categoryType === "All"
+ ? TEMPLATES
+ : TEMPLATES.filter((item) => item.categoryType === categoryType),
+ [categoryType],
+ );
+ const foundTemplates = useMemo(
+ () =>
+ filteredTemplates.reduce((total, category) => {
+ const templates = category.templates.filter(({ title }) =>
+ title.toLowerCase().includes(searchValue.toLowerCase()),
+ );
+
+ if (!templates.length) {
+ return total;
+ }
+
+ return [...total, { ...category, templates }];
+ }, [] as Category[]),
+ [searchValue, categoryType],
+ );
return (
-
-
-
-
- ),
- }}
- />
-
-
-
- Категории
-
-
-
+
+
-
-
+ {foundTemplates.map((template) => (
+
+ ))}
diff --git a/src/pages/createQuize/QuizGallery/templates/Auto.ts b/src/pages/createQuize/QuizGallery/templates/Auto.ts
new file mode 100644
index 00000000..c696485e
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Auto.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const AUTO_TEMPLATES: Category = {
+ categoryType: "Auto",
+ category: "Авто",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Education.ts b/src/pages/createQuize/QuizGallery/templates/Education.ts
new file mode 100644
index 00000000..9b12f93c
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Education.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const EDUCATION_TEMPLATES: Category = {
+ categoryType: "Education",
+ category: "Образование",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Health.ts b/src/pages/createQuize/QuizGallery/templates/Health.ts
new file mode 100644
index 00000000..d94459ea
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Health.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const HEALTH_TEMPLATES: Category = {
+ categoryType: "Health",
+ category: "Здоровье и уход",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Polls.tsx b/src/pages/createQuize/QuizGallery/templates/Polls.tsx
deleted file mode 100644
index c39878e5..00000000
--- a/src/pages/createQuize/QuizGallery/templates/Polls.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Template } from "../Template";
-
-import quizTemplateImage4 from "@/assets/quiz-templates/quiz-template-4.png";
-import quizTemplateImage5 from "@/assets/quiz-templates/quiz-template-5.png";
-import quizTemplateImage6 from "@/assets/quiz-templates/quiz-template-6.png";
-
-export const PoolsTemplate = () => {
- return (
-
- );
-};
diff --git a/src/pages/createQuize/QuizGallery/templates/Production.ts b/src/pages/createQuize/QuizGallery/templates/Production.ts
new file mode 100644
index 00000000..169a3079
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Production.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const PRODUCTION_TEMPLATES: Category = {
+ categoryType: "Production",
+ category: "Производство",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/RealEstate.ts b/src/pages/createQuize/QuizGallery/templates/RealEstate.ts
new file mode 100644
index 00000000..a0cfdb36
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/RealEstate.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const REAL_ESTATE_TEMPLATES: Category = {
+ categoryType: "RealEstate",
+ category: "Недвижимость",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Repair.ts b/src/pages/createQuize/QuizGallery/templates/Repair.ts
new file mode 100644
index 00000000..9c88157d
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Repair.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const REPAIR_TEMPLATES: Category = {
+ categoryType: "Repair",
+ category: "Ремонт",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Research.ts b/src/pages/createQuize/QuizGallery/templates/Research.ts
new file mode 100644
index 00000000..c900afd8
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Research.ts
@@ -0,0 +1,7 @@
+import type { Category } from "../Template";
+
+export const RESEARCH_TEMPLATES: Category = {
+ categoryType: "Research",
+ category: "Исследовательские",
+ templates: [],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Services.ts b/src/pages/createQuize/QuizGallery/templates/Services.ts
new file mode 100644
index 00000000..542a3263
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Services.ts
@@ -0,0 +1,80 @@
+import ServiceIcon1 from "@/assets/quiz-templates/services/service-1.jpg";
+import ServiceIcon2 from "@/assets/quiz-templates/services/service-2.jpg";
+import ServiceIcon3 from "@/assets/quiz-templates/services/service-3.jpg";
+import ServiceIcon4 from "@/assets/quiz-templates/services/service-4.jpg";
+import ServiceIcon5 from "@/assets/quiz-templates/services/service-5.jpg";
+import ServiceIcon6 from "@/assets/quiz-templates/services/service-6.jpg";
+import ServiceIcon7 from "@/assets/quiz-templates/services/service-7.jpg";
+import ServiceIcon8 from "@/assets/quiz-templates/services/service-8.jpg";
+import ServiceIcon9 from "@/assets/quiz-templates/services/service-9.jpg";
+import ServiceIcon10 from "@/assets/quiz-templates/services/service-10.jpg";
+import ServiceIcon11 from "@/assets/quiz-templates/services/service-11.jpg";
+
+import type { Category } from "../Template";
+
+export const SERVICE_TEMPLATES: Category = {
+ categoryType: "Services",
+ category: "Услуги",
+ templates: [
+ {
+ quizId: "a3490800-1ad3-4944-bb9c-32189d36b75c",
+ title:
+ "Ответьте на 3 вопроса и узнайте, паспорт какой европейской страны вам подойдёт",
+ picture: ServiceIcon1,
+ },
+ {
+ quizId: "785fed83-6608-4029-ae22-6a26ce621e5f",
+ title:
+ "Ответьте на 7 вопросов, чтобы получить коммерческое предложение от маркетолога",
+ picture: ServiceIcon2,
+ },
+ {
+ quizId: "dfa3733f-66ce-4335-b83a-2c6511cbd1ce",
+ title:
+ "Ответьте на пару вопросов, чтобы найти свой индивидуальный стиль одежды",
+ picture: ServiceIcon3,
+ },
+ {
+ quizId: "8bf582a9-0a66-4f7b-bc0f-3c2f656c7449",
+ title: "Обменяйте рубли на валюту с комиссией 0%",
+ picture: ServiceIcon4,
+ },
+ {
+ quizId: "206ba071-afe9-4ee0-a722-a24a4f592679",
+ title: "Рассчитайте стоимость уборки вашей квартиры",
+ picture: ServiceIcon5,
+ },
+ {
+ quizId: "6938ff93-52eb-4296-86bf-fe5aa3fddabf",
+ title: "Забронируйте номер в зоогостинице для своего любимого питомца",
+ picture: ServiceIcon6,
+ },
+ {
+ quizId: "5262bc69-1ea0-446c-a16f-e929b6190e6d",
+ title: "Организуем перевозку под ключ",
+ picture: ServiceIcon7,
+ },
+ {
+ quizId: "9f8015f7-07fc-4acb-92dd-6e00505884cc",
+ title: "Рассчитайте стоимость ремонта пластиковых окон за 3 минуты",
+ picture: ServiceIcon8,
+ },
+ {
+ quizId: "259749bf-a54f-4a8e-ab5a-4cd0862d7504",
+ title: "Поможем подобрать эскиз для татуировки",
+ picture: ServiceIcon9,
+ },
+ {
+ quizId: "e107c0cd-4fa1-4a8f-938a-10a329b6528d",
+ title: "Подбери себе лучшего юриста за 30 секунд",
+ categoryDescription: "Юр услуги",
+ picture: ServiceIcon10,
+ },
+ {
+ quizId: "ce7903b1-3dfb-4a28-a2a4-0b41af447ae1",
+ title: "Рассчитайте размер ипотечного кредитования, ответив на 4 вопроса",
+ categoryDescription: "Юр услуги",
+ picture: ServiceIcon11,
+ },
+ ],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Tourism.ts b/src/pages/createQuize/QuizGallery/templates/Tourism.ts
new file mode 100644
index 00000000..1a16e7a5
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/Tourism.ts
@@ -0,0 +1,69 @@
+import TourismIcon1 from "@/assets/quiz-templates/tourism/tourism-1.jpg";
+import TourismIcon2 from "@/assets/quiz-templates/tourism/tourism-2.jpg";
+import TourismIcon3 from "@/assets/quiz-templates/tourism/tourism-3.jpg";
+import TourismIcon4 from "@/assets/quiz-templates/tourism/tourism-4.jpg";
+import TourismIcon5 from "@/assets/quiz-templates/tourism/tourism-5.jpg";
+import TourismIcon6 from "@/assets/quiz-templates/tourism/tourism-6.jpg";
+import TourismIcon7 from "@/assets/quiz-templates/tourism/tourism-7.jpg";
+import TourismIcon8 from "@/assets/quiz-templates/tourism/tourism-8.jpg";
+import TourismIcon9 from "@/assets/quiz-templates/tourism/tourism-9.jpg";
+import TourismIcon10 from "@/assets/quiz-templates/tourism/tourism-10.jpg";
+
+import type { Category } from "../Template";
+
+export const TOURISM_TEMPLATES: Category = {
+ categoryType: "Tourism",
+ category: "Туризм",
+ templates: [
+ {
+ quizId: "f7a2b3b8-2548-47d8-afb3-f2c69a3a0a81",
+ title: "Подбор туристической страховки",
+ picture: TourismIcon1,
+ },
+ {
+ quizId: "e0927ded-5c4c-4d45-a5ba-c2e938362ffa",
+ title: "Оцените свои шансы на получение визы в США",
+ picture: TourismIcon2,
+ },
+ {
+ quizId: "23af97f4-0b8f-4d8b-8099-66ebef409ce1",
+ title: "Персональный тур с лучшими местами в Германии",
+ picture: TourismIcon3,
+ },
+ {
+ quizId: "ca3bd705-7d41-4ff1-ae4c-0b2d4a8faa30",
+ title: "Подберём лучший вариант тура под ваши критерии",
+ picture: TourismIcon4,
+ },
+ {
+ quizId: "5c2effd9-fe6a-40e6-9752-3f61dc20d6fa",
+ title: "Выберем самый подходящий для вас тур в Грузию",
+ picture: TourismIcon5,
+ },
+ {
+ quizId: "b559a764-6f55-4dc2-a9c4-aecd8b96003c",
+ title: "Бонжур, Сена! Подберём для вас тур по Франции",
+ picture: TourismIcon6,
+ },
+ {
+ quizId: "e33bf54b-9ad5-4cb9-b552-77148264d6af",
+ title: "Персональный тур в Египет с лучшими местами страны",
+ picture: TourismIcon7,
+ },
+ {
+ quizId: "c5815b1d-4991-4df2-ae14-8713d7f313b9",
+ title: "Тур по местам России",
+ picture: TourismIcon8,
+ },
+ {
+ quizId: "a0a4dce8-43bb-4978-a802-96d384465df4",
+ title: "Подберём для вас тур с самыми красивыми местами мира",
+ picture: TourismIcon9,
+ },
+ {
+ quizId: "0749abc5-a352-41b9-85c3-db7541326f23",
+ title: "Выберем лучшие туристические места для вас",
+ picture: TourismIcon10,
+ },
+ ],
+};
diff --git a/src/pages/createQuize/QuizGallery/templates/Tourism.tsx b/src/pages/createQuize/QuizGallery/templates/Tourism.tsx
deleted file mode 100644
index fc0942d9..00000000
--- a/src/pages/createQuize/QuizGallery/templates/Tourism.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Template } from "../Template";
-
-import quizTemplateImage1 from "@/assets/quiz-templates/quiz-template-1.png";
-import quizTemplateImage2 from "@/assets/quiz-templates/quiz-template-2.png";
-import quizTemplateImage3 from "@/assets/quiz-templates/quiz-template-3.png";
-
-export const TourismTemplate = () => {
- return (
-
- );
-};
diff --git a/src/pages/createQuize/QuizGallery/templates/index.ts b/src/pages/createQuize/QuizGallery/templates/index.ts
new file mode 100644
index 00000000..8c949414
--- /dev/null
+++ b/src/pages/createQuize/QuizGallery/templates/index.ts
@@ -0,0 +1,23 @@
+import { TOURISM_TEMPLATES } from "./Tourism";
+import { SERVICE_TEMPLATES } from "./Services";
+import { REAL_ESTATE_TEMPLATES } from "./RealEstate";
+import { AUTO_TEMPLATES } from "./Auto";
+import { HEALTH_TEMPLATES } from "./Health";
+import { RESEARCH_TEMPLATES } from "./Research";
+import { PRODUCTION_TEMPLATES } from "./Production";
+import { REPAIR_TEMPLATES } from "./Repair";
+import { EDUCATION_TEMPLATES } from "./Education";
+
+import type { Category } from "../Template";
+
+export const TEMPLATES: Category[] = [
+ TOURISM_TEMPLATES,
+ SERVICE_TEMPLATES,
+ REAL_ESTATE_TEMPLATES,
+ AUTO_TEMPLATES,
+ HEALTH_TEMPLATES,
+ RESEARCH_TEMPLATES,
+ PRODUCTION_TEMPLATES,
+ REPAIR_TEMPLATES,
+ EDUCATION_TEMPLATES,
+];