From 91f4a2d31368c1fa7a4fe48eb1177a8a6580120a Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Fri, 24 Jan 2025 23:36:35 -0600 Subject: [PATCH] Can this at least work? --- components/CarPlay/Home.tsx | 10 +++++++++ components/CarPlay/NowPlaying.tsx | 37 ------------------------------- components/carplay.tsx | 13 ----------- components/jellify.tsx | 6 ++--- 4 files changed, 13 insertions(+), 53 deletions(-) create mode 100644 components/CarPlay/Home.tsx delete mode 100644 components/CarPlay/NowPlaying.tsx delete mode 100644 components/carplay.tsx diff --git a/components/CarPlay/Home.tsx b/components/CarPlay/Home.tsx new file mode 100644 index 00000000..c842c511 --- /dev/null +++ b/components/CarPlay/Home.tsx @@ -0,0 +1,10 @@ +import { View } from "tamagui"; +import { Text } from "../Global/helpers/text"; + +export default function CarPlayHome() : React.JSX.Element { + return ( + + Yeet + + ) +} \ No newline at end of file diff --git a/components/CarPlay/NowPlaying.tsx b/components/CarPlay/NowPlaying.tsx deleted file mode 100644 index 0535becb..00000000 --- a/components/CarPlay/NowPlaying.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React, {useEffect} from 'react'; -import {Text, View} from 'react-native'; -import {CarPlay, NowPlayingTemplate} from 'react-native-carplay'; - -export function NowPlaying() { - useEffect(() => { - const template = new NowPlayingTemplate({ - albumArtistButtonEnabled: true, - buttons: [ - { - id: "favorite", - type: "add-to-library" - } - ], - upNextButtonEnabled: false, - onButtonPressed(e) { - console.log(e); - }, - }); - - CarPlay.enableNowPlaying(true); - CarPlay.pushTemplate(template); - - return () => {}; - - }, []); - - return ( - - Now Playing - - ); -} - -NowPlaying.navigationOptions = { - headerTitle: 'Now Playing Template', -}; \ No newline at end of file diff --git a/components/carplay.tsx b/components/carplay.tsx deleted file mode 100644 index 88f67e9f..00000000 --- a/components/carplay.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { createStackNavigator } from "@react-navigation/stack" -import { NowPlaying } from "./CarPlay/NowPlaying"; - -const Stack = createStackNavigator(); - -export default function JellifyCarplay(): React.JSX.Element { - - return ( - - - - ) -} \ No newline at end of file diff --git a/components/jellify.tsx b/components/jellify.tsx index 29d4932e..797a5868 100644 --- a/components/jellify.tsx +++ b/components/jellify.tsx @@ -13,7 +13,7 @@ import Client from "../api/client"; import { JellifyProvider, useJellifyContext } from "./provider"; import { CarPlay } from "react-native-carplay" import { createStackNavigator } from "@react-navigation/stack"; -import { NowPlaying } from "./CarPlay/NowPlaying"; +import CarPlayHome from "./CarPlay/Home"; export default function Jellify(): React.JSX.Element { @@ -63,8 +63,8 @@ function App(): React.JSX.Element { return carPlayConnected ? ( { loggedIn ? ( - - + + ) : (