Fix Item Click

This commit is contained in:
FlorianSpeicher
2025-06-22 13:58:56 +02:00
parent fe60045033
commit 2d1e464dfa

View File

@@ -147,7 +147,9 @@ export default function NavBar() {
sx={{
display: 'flex',
justifyContent: 'space-between',
px: 3
alignItems: 'center', // <--- HIER hinzugefügt
px: 3,
minHeight: { xs: 56, sm: 64 }, // optional: Standardhöhe für bessere Zentrierung
}}
>
<Box sx={{display: "flex", alignItems: "center", minWidth: "0px"}}>
@@ -155,6 +157,8 @@ export default function NavBar() {
src={logo}
alt="Logo"
className="navbar-logo"
style={{ display: "block", height: 40, marginRight: 12, objectFit: "contain" }} // optional: Höhe anpassen
onClick={() => navigate('/')}
/>
<Typography
variant="h6"
@@ -167,6 +171,9 @@ export default function NavBar() {
letterSpacing: ".3rem",
color: "white",
textDecoration: "none",
display: "flex",
alignItems: "center", // <--- HIER hinzugefügt
height: "100%", // optional
}}
>
Digitaler Produktionsshop
@@ -174,12 +181,25 @@ export default function NavBar() {
</Box>
<Box sx={{flexGrow: 1, display: "flex", justifyContent: "center", px: 3, zIndex: 100000}}>
<Box sx={{
flexGrow: 1,
display: "flex",
justifyContent: "center",
alignItems: "center", // <--- HIER hinzugefügt
px: 3,
zIndex: 100000
}}>
<Autocomplete
sx={{flexGrow: 1, minWidth: "150px", maxWidth: "600px"}}
sx={{
flexGrow: 1,
minWidth: "150px",
maxWidth: "600px",
display: "flex",
alignItems: "center" // <--- HIER hinzugefügt
}}
freeSolo
options={itemNames} // Item-Namen für Autocomplete
onInputChange={handleSearch} // Suche auslösen
options={itemNames}
onInputChange={handleSearch}
renderInput={(params) => (
<TextField
{...params}