diff --git a/client/src/pages/info/ui/InfoPage.tsx b/client/src/pages/info/ui/InfoPage.tsx index 318b328..bbfad43 100644 --- a/client/src/pages/info/ui/InfoPage.tsx +++ b/client/src/pages/info/ui/InfoPage.tsx @@ -1,42 +1,27 @@ -import Alert from '@mui/material/Alert' import Box from '@mui/material/Box' -import Paper from '@mui/material/Paper' import Stack from '@mui/material/Stack' import Typography from '@mui/material/Typography' -import { useQuery } from '@tanstack/react-query' -import { fetchPublicInfoBlocks } from '@/entities/info' +import { DeliverySection } from './sections/DeliverySection' +import { HowToOrderSection } from './sections/HowToOrderSection' +import { PaymentSection } from './sections/PaymentSection' +import { ReturnsSection } from './sections/ReturnsSection' export function InfoPage() { - const q = useQuery({ - queryKey: ['info-page', 'public', 'blocks'], - queryFn: fetchPublicInfoBlocks, - }) - return ( Информация для покупателей - + Как оформить заказ, как проходит доставка, оплата и другие важные детали. - {q.isLoading && Загрузка…} - {q.isError && Не удалось загрузить информацию.} - {q.isSuccess && q.data.items.length === 0 && Раздел пока не заполнен.} - - {q.isSuccess && q.data.items.length > 0 && ( - - {q.data.items.map((block) => ( - - - {block.title} - - {block.body} - - ))} - - )} + + + + + + ) }