import React from 'react'; import { Box, AppBar, Toolbar, Container, Typography, Grid, Card, CardMedia, CardContent } from '@mui/material'; import Footer from './components/Footer.js'; import { Logo, SearchBar, CategoryList } from './components/header/index.js'; const PrerenderCategory = ({ categoryId, categoryName, categorySeoName: _categorySeoName, productData }) => { const products = productData?.products || []; return ( {/* First row: Logo and ButtonGroup on xs, all items on larger screens */} {/* Top row for xs, single row for larger screens */} {/* SearchBar visible on sm and up */} {/* Second row: SearchBar only on xs */} {/* Category Info */} {categoryName || `Category ${categoryId}`} {/* Product list */} Products {products.length > 0 && `(${products.length})`} {products.length > 0 ? ( {products.map((product) => ( {product.name} Art.-Nr.: {product.articleNumber} {product.price ? `€${parseFloat(product.price).toFixed(2)}` : 'Preis auf Anfrage'} ))} ) : ( No products found in this category )}