Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions components/NavBar/components/UserDropbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ const UserDropbox = () => {
>
<Stack
direction="row"
gap="4px"
gap="1rem"
alignItems="center"
justifyContent="center"
p="6px 8px"
borderRadius="20px"
boxShadow="0px -1px 0px 0px #292929 inset, 0px 0px 0px 0.5px #292929"
>
<CustomAvatar accountId={accountId} size={24} />
<Typography fontSize={14} fontWeight={500} color="#292929">
{truncate(profileInfo?.name || accountId, 10)}
</Typography>
{isAdmin && (
<Typography
sx={{ textDecorationLine: "underline" }}
Expand All @@ -96,13 +99,25 @@ const UserDropbox = () => {
Admin
</Typography>
)}
{open ? <KeyboardArrowRightIcon /> : <KeyboardArrowDownIcon />}
{open ? (
<KeyboardArrowRightIcon sx={{ color: "black" }} />
) : (
<KeyboardArrowDownIcon sx={{ color: "black" }} />
)}
</Stack>
</ButtonContainer>
<Menu anchorEl={anchorEl} open={open} onClose={handleClose}>
<Stack direction="row" alignItems="center" ml={2} mb={2}>
<CustomAvatar accountId={accountId} size={48} fontSize={16} />
<Typography fontSize={14} fontWeight={500} lineHeight="20px" ml={2}>
<Typography
fontSize={14}
fontWeight={500}
lineHeight="20px"
display={{
sm: "none",
}}
ml={2}
>
{truncate(profileInfo?.name || accountId, 14)}
</Typography>
</Stack>
Expand Down
5 changes: 2 additions & 3 deletions components/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Tag from "../ui/Tag";

const NavBar = () => {
const router = useRouter();
const { walletConnected, isAdmin, isVerifiedHuman } = useUser();
const { walletConnected, isVerifiedHuman } = useUser();
const { maxWidth430 } = useBreakPoints();
const isAdminPage = useIsAdminPage();

Expand Down Expand Up @@ -78,8 +78,7 @@ const NavBar = () => {
<Stack direction="row" mb={maxWidth430 ? 2 : 0}>
<Stack
direction={maxWidth430 ? "column" : "row"}
width={isAdmin ? (isAdminPage ? 300 : 350) : 300}
justifyContent="space-between"
gap="0.75rem"
alignItems="center"
>
{!isAdminPage && (
Expand Down
2 changes: 1 addition & 1 deletion contexts/Web3AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const Web3AuthProvider: FC<Props> = ({ children }) => {

// Initializes the store
await initStore();
}, [updateUserInfo, initStore, registerLoginTime]);
}, [updateUserInfo, initStore, registerLoginTime, walletApi]);

// Re-init when user is signed in
useEffect(() => {
Expand Down