Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit cc9fd22

Browse files
committed
Correct login screen issue on mobile devices
1 parent dee15ef commit cc9fd22

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

src/layouts/MainLayout/TopBar/Account.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
Box,
1212
Avatar,
1313
Menu,
14-
MenuItem
14+
MenuItem,
15+
Hidden
1516
} from '@material-ui/core';
1617
import authService from 'src/services/authService';
1718
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth';
@@ -76,7 +77,7 @@ function Account() {
7677
alignItems="center"
7778
onClick={handleOpenMenu}
7879
style={{
79-
cursor: "pointer"
80+
cursor: 'pointer'
8081
}}
8182
>
8283
<Avatar
@@ -104,16 +105,17 @@ function Account() {
104105
/>
105106
)}
106107
</Avatar>
107-
108-
<Typography variant="h6">
109-
<Box
110-
style={{
111-
color: '#A60000'
112-
}}
113-
>
114-
{`Hello ${truncate(user.displayName)}`}
115-
</Box>
116-
</Typography>
108+
<Hidden smDown>
109+
<Typography variant="h6">
110+
<Box
111+
style={{
112+
color: '#A60000'
113+
}}
114+
>
115+
{`Hello ${truncate(user.displayName)}`}
116+
</Box>
117+
</Typography>
118+
</Hidden>
117119
</Box>
118120
) : (
119121
<Button
@@ -124,7 +126,7 @@ function Account() {
124126
textTransform: 'capitalize'
125127
}}
126128
>
127-
<Typography variant="h6">Login / Sign Up</Typography>
129+
<Typography variant="h6">Login</Typography>
128130
</Button>
129131
)}
130132

src/layouts/MainLayout/TopBar/index.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ function TopBar({ className, onMobileNavOpen, ...rest }) {
6565
const navItems = [
6666
{ title: 'Campus Leaders', link: '/campusLeaders' },
6767
{ title: 'Events', link: '/events' },
68-
{ title: 'Courses', link: '/courses' },
68+
{ title: 'Courses', link: '/courses' }
6969
// { title: 'Team', link: '/team' }
70-
]
70+
];
7171

7272
const list = () => (
7373
<div
@@ -136,22 +136,33 @@ function TopBar({ className, onMobileNavOpen, ...rest }) {
136136
<Hidden smDown>
137137
<Box ml={2} flexGrow={1} />
138138
{navItems.map((item, index) => (
139-
<Item active={item.link === pathname} title={item.title} link={item.link} />
140-
))};
139+
<Item
140+
active={item.link === pathname}
141+
title={item.title}
142+
link={item.link}
143+
/>
144+
))}
145+
;
141146
<Box ml={2} flexGrow={0.05} />
142147
<Box ml={2}>
143148
<OpenSource />
144149
</Box>
145150
<Box ml={2} flexGrow={0.05} />
146151
</Hidden>
147152
<Hidden mdUp>
148-
<Box ml={8}>
153+
<Box
154+
display="flex"
155+
flexDirection="row"
156+
alignItems="center"
157+
style={{ position: 'absolute', right: '0px'}}
158+
>
159+
<OpenSource />
160+
149161
<IconButton
150162
edge="end"
151163
className={classes.menuButton}
152164
aria-label="menu"
153165
onClick={toggleDrawer('right', true)}
154-
style={{ position: 'absolute', right: '15px', top: '15%' }}
155166
>
156167
<MenuIcon />
157168
</IconButton>

0 commit comments

Comments
 (0)