This repository was archived by the owner on Mar 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ const home = ({ session }) => {
4545
4646 // Mobile menu data
4747 const mobileMenu = [
48- { name : 'Login' , icon : LoginIcon , href : '/login' } ,
4948 { name : 'Marketplace' , icon : PlayIcon , href :'/dashboard' }
5049 ]
5150
@@ -221,7 +220,7 @@ const home = ({ session }) => {
221220 </ div >
222221 </ div >
223222 < div className = "mt-6" >
224- < nav className = "grid gap-y-8 " >
223+ < nav className = "grid gap-y-6 " >
225224 { mobileMenu . map ( ( item ) => (
226225 < a
227226 key = { item . name }
@@ -232,6 +231,32 @@ const home = ({ session }) => {
232231 < span className = "ml-3 text-base font-medium text-gray-900" > { item . name } </ span >
233232 </ a >
234233 ) ) }
234+
235+ < div className = "flex py-1 justify-between" >
236+ { /* Login button */ }
237+ { ! session ?(
238+ < a
239+ href = "/login"
240+ className = "-m-3 p-3 flex items-center rounded-md hover:bg-gray-50"
241+ >
242+ < LoginIcon className = "flex-shrink-0 h-6 w-6 text-purple-600" aria-hidden = "true" />
243+ < span className = "ml-3 text-base font-medium text-gray-900" > Login</ span >
244+ </ a >
245+ ) :(
246+ < >
247+ { /* Profile and Logout button */ }
248+ < div className = "flex items-center" >
249+ < img className = "h-8 w-8 mx-2 rounded-full" src = { session . picture } alt = "" />
250+ < div className = "text-base font-medium" > { session . name } </ div >
251+ </ div >
252+ < button
253+ type = "button"
254+ className = "p-1"
255+ >
256+ < LogoutIcon onClick = { ( ) => signOut ( ) } className = "h-6 w-6" aria-hidden = "true" />
257+ </ button >
258+ </ > ) }
259+ </ div >
235260 </ nav >
236261 </ div >
237262 </ div >
You can’t perform that action at this time.
0 commit comments