feat(ProductDetailPage): add manufacturer button for search navigation
- Enhance the ProductDetailPage by introducing a button for the manufacturer that allows users to navigate to search results for that manufacturer. - Improve user interaction with styling adjustments for the button, ensuring a seamless experience when accessing related products.
This commit is contained in:
@@ -992,7 +992,31 @@ class ProductDetailPage extends Component {
|
||||
{product.manufacturer && (
|
||||
<Box sx={{ display: "flex", alignItems: "center", mb: 2 }}>
|
||||
<Typography variant="body2" sx={{ fontStyle: "italic" }}>
|
||||
{this.props.t ? this.props.t('product.manufacturer') : 'Hersteller'}: {product.manufacturer}
|
||||
{this.props.t ? this.props.t('product.manufacturer') : 'Hersteller'}:
|
||||
<Button
|
||||
variant="text"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
if (this.props.navigate) {
|
||||
this.props.navigate(`/search?q=${encodeURIComponent(product.manufacturer)}`);
|
||||
}
|
||||
}}
|
||||
sx={{
|
||||
ml: 0.5,
|
||||
p: 0,
|
||||
minWidth: 'auto',
|
||||
height: 'auto',
|
||||
fontSize: 'inherit',
|
||||
fontStyle: 'inherit',
|
||||
textTransform: 'none',
|
||||
'&:hover': {
|
||||
backgroundColor: 'transparent',
|
||||
textDecoration: 'underline',
|
||||
}
|
||||
}}
|
||||
>
|
||||
{product.manufacturer}
|
||||
</Button>
|
||||
</Typography>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user