import { useNavigate } from "react-router-dom"; import { useTranslation } from "react-i18next"; import routes from "@/routes"; import styles from "./styles.module.css"; import MainButton from "../MainButton"; import Title from "../Title"; import { useApi, useApiCall } from "@/api"; import { useCallback } from "react"; import { Asset } from "@/api/resources/Assets"; function FeedbackPage(): JSX.Element { const { t } = useTranslation(); const navigate = useNavigate(); const api = useApi(); const handleNext = () => navigate(routes.client.freePeriodInfo()); const assetsData = useCallback(async () => { const { assets } = await api.getAssets({ category: String("au") }); return assets; }, [api]); const { data: assets, // isPending } = useApiCall(assetsData); const reviews = [ { title: t("aura.name_1.review"), text: t("aura.review_1.content"), imageKey: "au.1.avatar", }, { title: t("aura.name_2.review"), text: t("aura.review_2.content"), imageKey: "au.2.avatar", }, ]; return (
{reviews.map(({ title, text, imageKey }, index) => (
asset.key === imageKey)?.url} alt="profile picture" />
{title} stop

{text}

))}
{t("next")}
); } export default FeedbackPage;