Remove bolded More from navbar
This commit is contained in:
		
							parent
							
								
									d553aae71e
								
							
						
					
					
						commit
						52a89d0783
					
				| 
						 | 
					@ -9,7 +9,7 @@ import {
 | 
				
			||||||
import { Transition, Dialog } from '@headlessui/react'
 | 
					import { Transition, Dialog } from '@headlessui/react'
 | 
				
			||||||
import { useState, Fragment } from 'react'
 | 
					import { useState, Fragment } from 'react'
 | 
				
			||||||
import Sidebar, { Item } from './sidebar'
 | 
					import Sidebar, { Item } from './sidebar'
 | 
				
			||||||
import { usePrivateUser, useUser } from 'web/hooks/use-user'
 | 
					import { useUser } from 'web/hooks/use-user'
 | 
				
			||||||
import { formatMoney } from 'common/util/format'
 | 
					import { formatMoney } from 'common/util/format'
 | 
				
			||||||
import { Avatar } from '../avatar'
 | 
					import { Avatar } from '../avatar'
 | 
				
			||||||
import clsx from 'clsx'
 | 
					import clsx from 'clsx'
 | 
				
			||||||
| 
						 | 
					@ -17,8 +17,6 @@ import { useRouter } from 'next/router'
 | 
				
			||||||
import NotificationsIcon from 'web/components/notifications-icon'
 | 
					import NotificationsIcon from 'web/components/notifications-icon'
 | 
				
			||||||
import { useIsIframe } from 'web/hooks/use-is-iframe'
 | 
					import { useIsIframe } from 'web/hooks/use-is-iframe'
 | 
				
			||||||
import { trackCallback } from 'web/lib/service/analytics'
 | 
					import { trackCallback } from 'web/lib/service/analytics'
 | 
				
			||||||
import { useUnseenPreferredNotifications } from 'web/hooks/use-notifications'
 | 
					 | 
				
			||||||
import { PrivateUser } from 'common/user'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
function getNavigation() {
 | 
					function getNavigation() {
 | 
				
			||||||
  return [
 | 
					  return [
 | 
				
			||||||
| 
						 | 
					@ -44,7 +42,6 @@ export function BottomNavBar() {
 | 
				
			||||||
  const currentPage = router.pathname
 | 
					  const currentPage = router.pathname
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const user = useUser()
 | 
					  const user = useUser()
 | 
				
			||||||
  const privateUser = usePrivateUser()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const isIframe = useIsIframe()
 | 
					  const isIframe = useIsIframe()
 | 
				
			||||||
  if (isIframe) {
 | 
					  if (isIframe) {
 | 
				
			||||||
| 
						 | 
					@ -85,11 +82,7 @@ export function BottomNavBar() {
 | 
				
			||||||
        onClick={() => setSidebarOpen(true)}
 | 
					        onClick={() => setSidebarOpen(true)}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <MenuAlt3Icon className=" my-1 mx-auto h-6 w-6" aria-hidden="true" />
 | 
					        <MenuAlt3Icon className=" my-1 mx-auto h-6 w-6" aria-hidden="true" />
 | 
				
			||||||
        {privateUser ? (
 | 
					        More
 | 
				
			||||||
          <MoreMenuWithGroupNotifications privateUser={privateUser} />
 | 
					 | 
				
			||||||
        ) : (
 | 
					 | 
				
			||||||
          'More'
 | 
					 | 
				
			||||||
        )}
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <MobileSidebar
 | 
					      <MobileSidebar
 | 
				
			||||||
| 
						 | 
					@ -100,22 +93,6 @@ export function BottomNavBar() {
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function MoreMenuWithGroupNotifications(props: { privateUser: PrivateUser }) {
 | 
					 | 
				
			||||||
  const { privateUser } = props
 | 
					 | 
				
			||||||
  const preferredNotifications = useUnseenPreferredNotifications(privateUser, {
 | 
					 | 
				
			||||||
    customHref: '/group/',
 | 
					 | 
				
			||||||
  })
 | 
					 | 
				
			||||||
  return (
 | 
					 | 
				
			||||||
    <span
 | 
					 | 
				
			||||||
      className={
 | 
					 | 
				
			||||||
        preferredNotifications.length > 0 ? 'font-bold' : 'font-normal'
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      More
 | 
					 | 
				
			||||||
    </span>
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function NavBarItem(props: { item: Item; currentPage: string }) {
 | 
					function NavBarItem(props: { item: Item; currentPage: string }) {
 | 
				
			||||||
  const { item, currentPage } = props
 | 
					  const { item, currentPage } = props
 | 
				
			||||||
  const track = trackCallback(`navbar: ${item.trackingEventName ?? item.name}`)
 | 
					  const track = trackCallback(`navbar: ${item.trackingEventName ?? item.name}`)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user