feat: add settings button on menu

This commit is contained in:
swve 2023-04-13 22:57:08 +02:00
parent 8d5f61102b
commit f3aee68a99

View file

@ -3,6 +3,7 @@ import styled from "styled-components";
import Link from "next/link";
import { AuthContext } from "./AuthProvider";
import Avvvatars from "avvvatars-react";
import { GearIcon } from "@radix-ui/react-icons";
export const HeaderProfileBox = () => {
const auth: any = React.useContext(AuthContext);
@ -31,6 +32,7 @@ export const HeaderProfileBox = () => {
<div>
<Avvvatars value={auth.userInfo.user_object.user_id} style="shape" />
</div>
<Link href={"/settings"}><GearIcon/></Link>
</AccountArea>
)}
</ProfileArea>
@ -42,6 +44,23 @@ const AccountArea = styled.div`
display: flex;
place-items: center;
a{
// center the gear icon
display: flex;
place-items: center;
place-content: center;
width: 29px;
height: 29px;
border-radius: 19px;
background: #F5F5F5;
// hover effect
&:hover{
background: #E5E5E5;
}
}
div {
margin-right: 10px;
}