Skip to content

Commit

Permalink
feat(sanity): use middleware components in StudioNavbar
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner committed Oct 6, 2022
1 parent 9f5ec39 commit 4b37654
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {useWorkspace} from '../../workspace'
import {useColorScheme} from '../../colorScheme'
import {useWorkspaces} from '../../workspaces'
import {NavbarContext} from '../../StudioLayout'
import {useLogoComponent, useToolMenuComponent} from '../../studio-components-hooks'
import {UserMenu} from './userMenu'
import {NewDocumentButton} from './NewDocumentButton'
import {PresenceMenu} from './presence'
Expand Down Expand Up @@ -66,7 +67,7 @@ const LeftFlex = styled(Flex)`

/** @beta */
export function StudioNavbar() {
const {name, studio, tools, ...workspace} = useWorkspace()
const {name, tools, ...workspace} = useWorkspace()
const workspaces = useWorkspaces()
const routerState = useRouterState()
const {scheme} = useColorScheme()
Expand All @@ -76,7 +77,8 @@ export function StudioNavbar() {

const {fullscreenSearchPortalEl, onSearchOpenChange} = useContext(NavbarContext)

const {Logo, ToolMenu} = studio.components
const Logo = useLogoComponent()
const ToolMenu = useToolMenuComponent()

const [searchOpen, setSearchOpen] = useState<boolean>(false)
const [drawerOpen, setDrawerOpen] = useState<boolean>(false)
Expand Down

0 comments on commit 4b37654

Please sign in to comment.