Expo Router – Web Specific component in _layout.jsx does not show content from other pages in the directory

I am trying to use a bottom tab bar on iOS and Android and a top nav bar on web. I have the following directory:

app
 |- (tabs)
     |- _layout.jsx
     |- browse.jsx
     |- search.jsx

And here is my code:

_layout.jsx

import { Feather } from '@expo/vector-icons'
import { Tabs } from 'expo-router'
import { Platform } from 'react-native'
import PrimaryWebNav from '../../components/PrimaryWebNav'

const TabsLayout = () => {
  const tabs = [
    {
      href: '/browse',
      text: 'Browse',
      name: 'browse',
      headerTitle: 'Browse',
      tabBarLabel: 'Browse',
      iconName: 'compass'
    },
    {
      href: '/search',
      text: 'Search',
      name: 'search',
      headerTitle: 'Search',
      tabBarLabel: 'Search',
      iconName: 'search'
    }
  ]

  if (Platform.OS === 'web') {
    return <PrimaryWebNav />
  }
  return (
    <Tabs>
      {tabs.map((tab) => {
        const { name, headerTitle, tabBarLabel, headerShown, iconName } = tab
        const tabBarIcon = ({ size, color }) => <Feather name={iconName} size={size} color={color} />

        return (
          <Tabs.Screen
            key={name}
            name={name}
            options={{
              headerTitle,
              tabBarLabel,
              headerShown,
              tabBarIcon,

              headerTitleAlign: 'left'
            }}
          />
        )
      })}
    </Tabs>
  )
}

export default TabsLayout

PrimaryWebNav.jsx

import { usePathname } from 'expo-router'
import { useState } from 'react'
import { Text } from 'react-native'
import WebModal from '../WebModal'
import SearchBox from './SearchBox'
import WebNavContainer from './WebNavContainer'
import WebNavIconContainer from './WebNavIconContainer'
import WebNavTextContainer from './WebNavTextContainer'
import WebNavTextLink from './WebNavTextLink'

const PrimaryWebNav = ({ children }) => {
  const pathName = usePathname()
  const [isModalVisible, setModalVisible] = useState(false)

  const toggleWebModal = () => {
    setModalVisible(!isModalVisible)
  }

  console.log('Rendering PrimaryWebNav with children:', children)

  return (
    <>
      <WebNavContainer>
        <WebNavTextContainer>
          <WebNavTextLink text="Browse" href="/browse" pathName={pathName} />
        </WebNavTextContainer>
        <WebNavIconContainer>
          <SearchBox />
        </WebNavIconContainer>
      </WebNavContainer>
      <WebModal isVisible={isModalVisible} toggleModal={toggleWebModal}>
        <Text>Modal Content</Text>
      </WebModal>
    </>
  )
}

export default PrimaryWebNav

browse.jsx

import { router, useNavigation } from 'expo-router'
import { useLayoutEffect } from 'react'
import { Platform } from 'react-native'
import { Content, Screen } from '../../components/containers'
import Filter from '../../components/MobileHeader/Filter'
import MobileMainHeaderTitle from '../../components/MobileHeader/Title'
import { TextButton } from '../../components/ui'
import WebPageHeader from '../../components/WebPageHeader'

const headerRight = () => <Filter />
const headerTitle = () => <MobileMainHeaderTitle action="Browse" item="Recommendations" />

const Browse = () => {
  const { setOptions } = useNavigation()

  useLayoutEffect(() => {
    setOptions({
      headerTitle,
      headerRight
    })
  }, [setOptions])

  return (
    <Screen>
      {Platform.OS === 'web' && <WebPageHeader title="Browse Recommendations" />}
      <Content>
        <TextButton text="Friend 123" onPress={() => router.push('/friends/123')} />
        <TextButton text="Movie 45" onPress={() => router.push('/movies/45')} />
        <TextButton text="Podcast Episode 81" onPress={() => router.push('/podcastEpisodes/81')} />
        <TextButton text="Podcast Series 99" onPress={() => router.push('/podcastSeries/99')} />
        <TextButton text="TV Series 111" onPress={() => router.push('/tvSeries/111')} />
      </Content>
    </Screen>
  )
}

export default Browse

None of the content in browse.jsx displays on web, but it does in iOS. And it shows up on web when I comment out in _layout.jsx:

if (Platform.OS === 'web') {
    return <PrimaryWebNav />
  }

Any idea what the problem is and/or how I can fix it?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật