@@ -5,9 +5,13 @@ import Player from '../../components/Player';
55import { SimplePopover } from '../../components/Popover' ;
66import { fetchArtists } from '../queries' ;
77import MainNavHeader from './MainNavHeader' ;
8+ import { getUserAgent } from './layout' ;
9+ import AndroidUpgradeNotification from './AndroidUpgradeNotification' ;
810
911export default async function NavBar ( ) {
1012 const artists = await fetchArtists ( ) ;
13+ const userAgent = await getUserAgent ( ) ;
14+ const isAndroid = / a n d r o i d / i. test ( userAgent ?. ua || '' ) ;
1115
1216 const artistSlugsToName = artists . reduce (
1317 ( memo , next ) => {
@@ -19,50 +23,53 @@ export default async function NavBar() {
1923 ) ;
2024
2125 return (
22- < div className = "navigation relative flex h-[50px] max-h-[50px] min-h-[50px] grid-cols-3 justify-between border-b-[1px] border-b-[#aeaeae] bg-white text-[#333333] lg:grid" >
23- < MainNavHeader artistSlugsToName = { artistSlugsToName } />
24- < div className = "player min-w-[60%] flex-1 text-center lg:min-w-[44vw] xl:min-w-[38vw]" >
25- < Player artistSlugsToName = { artistSlugsToName } />
26- </ div >
27- < SimplePopover content = { < Menu /> } >
28- < Flex className = "flex-2 h-full cursor-pointer content-end items-center text-center font-medium 2xl:hidden" >
29- < div className = "ml-auto flex h-full items-center px-1 active:relative active:top-[1px] active:text-[#333333]" >
30- < i className = "fa fa-bars text-inherit" />
31- </ div >
32- </ Flex >
33- </ SimplePopover >
34- < div className = "nav hidden h-full flex-[2] cursor-pointer items-center justify-end text-center font-medium 2xl:flex" >
35- < div className = "h-full px-1" >
36- < Link href = "/today" legacyBehavior prefetch = { false } >
37- < a className = "nav-btn" > TIH</ a >
38- </ Link >
39- </ div >
40- < div >
41- < Link href = "/recently-played" legacyBehavior prefetch = { false } >
42- < a className = "nav-btn whitespace-nowrap" > LIVE</ a >
43- </ Link >
44- </ div >
45- < div >
46- < Link href = "/chat" legacyBehavior prefetch = { false } >
47- < a className = "nav-btn" > CHAT</ a >
48- </ Link >
49- </ div >
50- < div >
51- < Link href = "/ios" legacyBehavior prefetch = { false } >
52- < a className = "nav-btn" > iOS</ a >
53- </ Link >
54- </ div >
55- < div >
56- < Link href = "/sonos" legacyBehavior prefetch = { false } >
57- < a className = "nav-btn" > SONOS</ a >
58- </ Link >
26+ < >
27+ < div className = "navigation relative flex h-[50px] max-h-[50px] min-h-[50px] grid-cols-3 justify-between border-b-[1px] border-b-[#aeaeae] bg-white text-[#333333] lg:grid" >
28+ < MainNavHeader artistSlugsToName = { artistSlugsToName } />
29+ < div className = "player min-w-[60%] flex-1 text-center lg:min-w-[44vw] xl:min-w-[38vw]" >
30+ < Player artistSlugsToName = { artistSlugsToName } />
5931 </ div >
60- < div >
61- < Link href = "/about" legacyBehavior prefetch = { false } >
62- < a className = "nav-btn" > ABOUT</ a >
63- </ Link >
32+ < SimplePopover content = { < Menu /> } >
33+ < Flex className = "flex-2 h-full cursor-pointer content-end items-center text-center font-medium 2xl:hidden" >
34+ < div className = "ml-auto flex h-full items-center px-1 active:relative active:top-[1px] active:text-[#333333]" >
35+ < i className = "fa fa-bars text-inherit" />
36+ </ div >
37+ </ Flex >
38+ </ SimplePopover >
39+ < div className = "nav hidden h-full flex-[2] cursor-pointer items-center justify-end text-center font-medium 2xl:flex" >
40+ < div className = "h-full px-1" >
41+ < Link href = "/today" legacyBehavior prefetch = { false } >
42+ < a className = "nav-btn" > TIH</ a >
43+ </ Link >
44+ </ div >
45+ < div >
46+ < Link href = "/recently-played" legacyBehavior prefetch = { false } >
47+ < a className = "nav-btn whitespace-nowrap" > LIVE</ a >
48+ </ Link >
49+ </ div >
50+ < div >
51+ < Link href = "/chat" legacyBehavior prefetch = { false } >
52+ < a className = "nav-btn" > CHAT</ a >
53+ </ Link >
54+ </ div >
55+ < div >
56+ < Link href = "/ios" legacyBehavior prefetch = { false } >
57+ < a className = "nav-btn" > iOS</ a >
58+ </ Link >
59+ </ div >
60+ < div >
61+ < Link href = "/sonos" legacyBehavior prefetch = { false } >
62+ < a className = "nav-btn" > SONOS</ a >
63+ </ Link >
64+ </ div >
65+ < div >
66+ < Link href = "/about" legacyBehavior prefetch = { false } >
67+ < a className = "nav-btn" > ABOUT</ a >
68+ </ Link >
69+ </ div >
6470 </ div >
6571 </ div >
66- </ div >
72+ { isAndroid && < AndroidUpgradeNotification /> }
73+ </ >
6774 ) ;
6875}
0 commit comments