|
|
|
@@ -1,5 +1,12 @@ |
|
|
|
import React, { useState, useMemo } from "react"; |
|
|
|
import { SearchInput } from "./NavbarComponent.styled"; |
|
|
|
import { |
|
|
|
List, |
|
|
|
ListItem, |
|
|
|
ListItemAvatar, |
|
|
|
ListItemText, |
|
|
|
Avatar, |
|
|
|
Divider, |
|
|
|
AppBar, |
|
|
|
Badge, |
|
|
|
Box, |
|
|
|
@@ -8,6 +15,7 @@ import { |
|
|
|
useMediaQuery, |
|
|
|
SvgIcon, |
|
|
|
Typography, |
|
|
|
Button, |
|
|
|
} from "@mui/material"; |
|
|
|
import { useTheme } from "@mui/system"; |
|
|
|
import MenuOutlinedIcon from "@mui/icons-material/MenuOutlined"; |
|
|
|
@@ -17,6 +25,9 @@ import AccountCircle from "@mui/icons-material/AccountCircle"; |
|
|
|
import Drawer from "./DrawerComponent"; |
|
|
|
import { PrimaryButton } from "../Buttons/PrimaryButton/PrimaryButton"; |
|
|
|
import { PRIMARY_YELLOW_COLOR } from "../../constants/stylesConstants"; |
|
|
|
import { PRIMARY_PURPLE_COLOR } from "../../constants/stylesConstants"; |
|
|
|
import EyeOn from "@mui/icons-material/Visibility"; |
|
|
|
import SearchIcon from "@mui/icons-material/Search"; |
|
|
|
import PopoverComponent from "./PopoverComponent"; |
|
|
|
|
|
|
|
const NavbarComponent = () => { |
|
|
|
@@ -181,9 +192,13 @@ const NavbarComponent = () => { |
|
|
|
) : ( |
|
|
|
<></> |
|
|
|
)} |
|
|
|
<Box> |
|
|
|
<p>Search</p> |
|
|
|
</Box> |
|
|
|
<SearchInput |
|
|
|
fullWidth |
|
|
|
endAdornment={<SearchIcon />} |
|
|
|
size="small" |
|
|
|
label="Pretražite proizvode" |
|
|
|
id="fullWidth" |
|
|
|
/> |
|
|
|
<Box |
|
|
|
sx={{ |
|
|
|
display: "flex", |
|
|
|
@@ -255,7 +270,106 @@ const NavbarComponent = () => { |
|
|
|
setPostsPopoverOpen(false); |
|
|
|
setPostsAnchorEl(null); |
|
|
|
}} |
|
|
|
content={<Typography sx={{ p: 2 }}>Moje objave</Typography>} |
|
|
|
content={ |
|
|
|
<> |
|
|
|
<Typography |
|
|
|
sx={{ |
|
|
|
p: 2, |
|
|
|
background: PRIMARY_PURPLE_COLOR, |
|
|
|
color: "white", |
|
|
|
width: "100%", |
|
|
|
}} |
|
|
|
> |
|
|
|
Moje objave |
|
|
|
</Typography> |
|
|
|
<List |
|
|
|
sx={{ width: "100%", maxWidth: 360, bgcolor: "background.paper" }} |
|
|
|
> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar alt="Remy Sharp" src="/static/images/avatar/1.jpg" /> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Brunch this weekend?" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
Ali Connors |
|
|
|
</Typography> |
|
|
|
{" — I'll be in your neighborhood doing errands this…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
<Divider variant="inset" component="li" /> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar |
|
|
|
alt="Travis Howard" |
|
|
|
src="/static/images/avatar/2.jpg" |
|
|
|
/> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Summer BBQ" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
to Scott, Alex, Jennifer |
|
|
|
</Typography> |
|
|
|
{" — Wish I could come, but I'm out of town this…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
<Divider variant="inset" component="li" /> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar alt="Cindy Baker" src="/static/images/avatar/3.jpg" /> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Oui Oui" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
Sandra Adams |
|
|
|
</Typography> |
|
|
|
{" — Do you have Paris recommendations? Have you ever…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
</List> |
|
|
|
<Button |
|
|
|
variant="text" |
|
|
|
endIcon={<EyeOn />} |
|
|
|
sx={{ |
|
|
|
textDecoration: "underline", |
|
|
|
float: "right", |
|
|
|
mr: 2, |
|
|
|
mb: 2, |
|
|
|
color: PRIMARY_PURPLE_COLOR, |
|
|
|
fontWeight: 500, |
|
|
|
}} |
|
|
|
> |
|
|
|
Pogledaj sve |
|
|
|
</Button> |
|
|
|
</> |
|
|
|
} |
|
|
|
/> |
|
|
|
<PopoverComponent |
|
|
|
anchorEl={msgAnchorEl} |
|
|
|
@@ -264,7 +378,106 @@ const NavbarComponent = () => { |
|
|
|
setMsgPopoverOpen(false); |
|
|
|
setMsgAnchorEl(null); |
|
|
|
}} |
|
|
|
content={<Typography sx={{ p: 2 }}>Moje poruke</Typography>} |
|
|
|
content={ |
|
|
|
<> |
|
|
|
<Typography |
|
|
|
sx={{ |
|
|
|
p: 2, |
|
|
|
background: PRIMARY_PURPLE_COLOR, |
|
|
|
color: "white", |
|
|
|
width: "100%", |
|
|
|
}} |
|
|
|
> |
|
|
|
Moje poruke |
|
|
|
</Typography> |
|
|
|
<List |
|
|
|
sx={{ width: "100%", maxWidth: 360, bgcolor: "background.paper" }} |
|
|
|
> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar alt="Remy Sharp" src="/static/images/avatar/1.jpg" /> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Brunch this weekend?" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
Ali Connors |
|
|
|
</Typography> |
|
|
|
{" — I'll be in your neighborhood doing errands this…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
<Divider variant="inset" component="li" /> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar |
|
|
|
alt="Travis Howard" |
|
|
|
src="/static/images/avatar/2.jpg" |
|
|
|
/> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Summer BBQ" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
to Scott, Alex, Jennifer |
|
|
|
</Typography> |
|
|
|
{" — Wish I could come, but I'm out of town this…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
<Divider variant="inset" component="li" /> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar alt="Cindy Baker" src="/static/images/avatar/3.jpg" /> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Oui Oui" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
Sandra Adams |
|
|
|
</Typography> |
|
|
|
{" — Do you have Paris recommendations? Have you ever…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
</List> |
|
|
|
<Button |
|
|
|
variant="text" |
|
|
|
endIcon={<EyeOn />} |
|
|
|
sx={{ |
|
|
|
textDecoration: "underline", |
|
|
|
float: "right", |
|
|
|
mr: 2, |
|
|
|
mb: 2, |
|
|
|
color: PRIMARY_PURPLE_COLOR, |
|
|
|
fontWeight: 500, |
|
|
|
}} |
|
|
|
> |
|
|
|
Pogledaj sve |
|
|
|
</Button> |
|
|
|
</> |
|
|
|
} |
|
|
|
/> |
|
|
|
<PopoverComponent |
|
|
|
anchorEl={userAnchorEl} |
|
|
|
@@ -273,7 +486,59 @@ const NavbarComponent = () => { |
|
|
|
setUserPopoverOpen(false); |
|
|
|
setUserAnchorEl(null); |
|
|
|
}} |
|
|
|
content={<Typography sx={{ p: 2 }}>Moj profil</Typography>} |
|
|
|
content={ |
|
|
|
<> |
|
|
|
<Typography |
|
|
|
sx={{ |
|
|
|
p: 2, |
|
|
|
background: PRIMARY_PURPLE_COLOR, |
|
|
|
color: "white", |
|
|
|
width: "100%", |
|
|
|
}} |
|
|
|
> |
|
|
|
Moj profil |
|
|
|
</Typography> |
|
|
|
<List |
|
|
|
sx={{ width: "100%", maxWidth: 360, bgcolor: "background.paper" }} |
|
|
|
> |
|
|
|
<ListItem alignItems="flex-start"> |
|
|
|
<ListItemAvatar> |
|
|
|
<Avatar alt="Remy Sharp" src="/static/images/avatar/1.jpg" /> |
|
|
|
</ListItemAvatar> |
|
|
|
<ListItemText |
|
|
|
primary="Brunch this weekend?" |
|
|
|
secondary={ |
|
|
|
<React.Fragment> |
|
|
|
<Typography |
|
|
|
sx={{ display: "inline" }} |
|
|
|
component="span" |
|
|
|
variant="body2" |
|
|
|
color="text.primary" |
|
|
|
> |
|
|
|
Ali Connors |
|
|
|
</Typography> |
|
|
|
{" — I'll be in your neighborhood doing errands this…"} |
|
|
|
</React.Fragment> |
|
|
|
} |
|
|
|
/> |
|
|
|
</ListItem> |
|
|
|
</List> |
|
|
|
<Button |
|
|
|
variant="text" |
|
|
|
endIcon={<EyeOn />} |
|
|
|
sx={{ |
|
|
|
textDecoration: "underline", |
|
|
|
float: "right", |
|
|
|
mr: 2, |
|
|
|
mb: 2, |
|
|
|
color: PRIMARY_PURPLE_COLOR, |
|
|
|
fontWeight: 500, |
|
|
|
}} |
|
|
|
> |
|
|
|
Pogledaj profil |
|
|
|
</Button> |
|
|
|
</> |
|
|
|
} |
|
|
|
/> |
|
|
|
</AppBar> |
|
|
|
); |