diff --git a/components/CarPlay/Navigation.tsx b/components/CarPlay/Navigation.tsx index 4d995a38..85b12e1f 100644 --- a/components/CarPlay/Navigation.tsx +++ b/components/CarPlay/Navigation.tsx @@ -3,7 +3,8 @@ import CarPlayHome from "./Home"; import CarPlayDiscover from "./Discover"; const CarPlayNavigation : TabBarTemplate = new TabBarTemplate({ - title: 'Navigation', + id: "Tabs", + title: 'Tabs', templates: [ CarPlayHome, CarPlayDiscover diff --git a/components/provider.tsx b/components/provider.tsx index 1bd58270..5974f46a 100644 --- a/components/provider.tsx +++ b/components/provider.tsx @@ -1,13 +1,13 @@ import Client from "../api/client"; -import { isUndefined } from "lodash"; +import { isNull, isUndefined } from "lodash"; import { createContext, ReactNode, SetStateAction, useContext, useEffect, useState } from "react"; import { Platform } from 'react-native' import { CarPlayInterface, NowPlayingTemplate, TabBarTemplate } from "react-native-carplay"; // 'react-native-carplay' has also been disabled for android builds in react-native.config.js const CarPlay = Platform.OS === 'ios' ? require('react-native-carplay').CarPlay as CarPlayInterface : null; -const CarPlayNavigation : TabBarTemplate = CarPlay ? require('./CarPlay/Navigation').CarPlayNavigation : null; -const CarPlayNowPlaying : NowPlayingTemplate = CarPlay ? require('./CarPlay/NowPlaying').CarPlayNowPlaying : null; +const CarPlayNavigation : TabBarTemplate = isNull(CarPlay) ? require('./CarPlay/Navigation').CarPlayNavigation : null; +const CarPlayNowPlaying : NowPlayingTemplate = isNull(CarPlay) ? require('./CarPlay/NowPlaying').CarPlayNowPlaying : null; interface JellifyContext { loggedIn: boolean;