-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6717bda
commit c400fc1
Showing
3 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,8 @@ function MenuDrawer({ isOpen, onClose, links }) { | |
|
||
function MenuDrawerUser({ isOpen, onClose}) { | ||
const router = useRouter() | ||
let userData = cookies.get("user") || null | ||
if(userData !== null) userData = JSON.parse(cookies.get("user")) | ||
|
||
const links = [ | ||
{name: "Perfil público", value: "profile"}, | ||
|
@@ -163,7 +165,7 @@ function MenuDrawerUser({ isOpen, onClose}) { | |
alt="" | ||
width="100%" | ||
height="100%" | ||
src="https://basedosdados-static.s3.us-east-2.amazonaws.com/equipe/sem_foto.png" | ||
src={userData?.picture ? userData?.picture : "https://basedosdados-static.s3.us-east-2.amazonaws.com/equipe/sem_foto.png"} | ||
/> | ||
</Box> | ||
<Text | ||
|
@@ -173,15 +175,15 @@ function MenuDrawerUser({ isOpen, onClose}) { | |
fontWeight="400" | ||
lineHeight="27px" | ||
letterSpacing="0.3px" | ||
>Dadinho</Text> | ||
>{userData?.username ? userData?.username : "Dadinho"}</Text> | ||
<Text | ||
color="#6F6F6F" | ||
fontFamily="Ubuntu" | ||
fontSize="14px" | ||
fontWeight="400" | ||
lineHeight="27px" | ||
letterSpacing="0.3px" | ||
>[email protected]</Text> | ||
>{userData?.email ? userData?.email : "[email protected]"}</Text> | ||
</Stack> | ||
|
||
<Accordion allowToggle width="100%" defaultIndex={0}> | ||
|
@@ -346,7 +348,7 @@ function MenuUser ({ userData, onOpen, onClose }) { | |
lineHeight="16px" | ||
letterSpacing="0.3px" | ||
> | ||
Dadinho | ||
{userData?.username ? userData?.username : "dadinho"} | ||
</Text> | ||
<Text | ||
color="#6F6F6F" | ||
|
@@ -356,7 +358,7 @@ function MenuUser ({ userData, onOpen, onClose }) { | |
lineHeight="16px" | ||
letterSpacing="0.3px" | ||
> | ||
[email protected] | ||
{userData?.email ? userData?.email : "[email protected]"} | ||
</Text> | ||
</MenuItem> | ||
|
||
|
@@ -586,7 +588,7 @@ function DesktopLinks({ links, position = false, path }) { | |
{!statusSearch && | ||
<HStack spacing={8} display={{ base: "none", lg: "flex" }}> | ||
{userData ? ( | ||
<MenuUser /> | ||
<MenuUser userData={userData}/> | ||
) : ( | ||
<> | ||
<Link fontSize="15px" fontFamily="Ubuntu" fontWeight="400" letterSpacing="0.3px" href="/user/login"> | ||
|
@@ -625,7 +627,7 @@ export default function MenuNav({}) { | |
{icon: <BDLogoProImage widthImage="54px"/>, name: "Dados exclusivos", href: "https://info.basedosdados.org/bd-pro"}, | ||
{icon: <BDLogoEduImage widthImage="54px"/>, name: "Curso de dados", href: "https://info.basedosdados.org/bd-edu"}, | ||
{}, | ||
{name: "Serviços", href: "/servicos"}, | ||
{name: "Serviço", href: "/servicos"}, | ||
{}, | ||
{name: "Estudos de caso", href: "/estudos-de-caso"} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters