mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-04 10:05:35 -06:00
Getting this bad boi to run
This commit is contained in:
3
App.tsx
3
App.tsx
@@ -1,7 +1,6 @@
|
||||
import './gesture-handler';
|
||||
import React from 'react';
|
||||
|
||||
import { usePlayer } from './player/queries';
|
||||
import Jellify from './components/Jellify/component';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
|
||||
@@ -9,8 +8,6 @@ export default function App(): React.JSX.Element {
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
usePlayer;
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Jellify />
|
||||
|
||||
@@ -4,28 +4,31 @@ import { NavigationContainer } from "@react-navigation/native";
|
||||
import Login from "./Login/component";
|
||||
import Navigation from "./navigation";
|
||||
import { Colors } from "react-native/Libraries/NewAppScreen";
|
||||
import { usePlayer } from "../player/queries";
|
||||
|
||||
export default function Jellify(): React.JSX.Element {
|
||||
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
|
||||
// Attempt to create API instance, if it fails we aren't authenticated yet
|
||||
let { error, isLoading, isSuccess } = useApi;
|
||||
const backgroundStyle = {
|
||||
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
||||
};
|
||||
|
||||
usePlayer;
|
||||
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<SafeAreaView style={backgroundStyle}>
|
||||
<StatusBar
|
||||
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
||||
backgroundColor={backgroundStyle.backgroundColor}
|
||||
/>
|
||||
isSuccess ? <Navigation /> : <Login />
|
||||
</SafeAreaView>
|
||||
</NavigationContainer>
|
||||
// Attempt to create API instance, if it fails we aren't authenticated yet
|
||||
let { error, isLoading, isSuccess } = useApi;
|
||||
const backgroundStyle = {
|
||||
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
||||
};
|
||||
|
||||
);
|
||||
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<SafeAreaView style={backgroundStyle}>
|
||||
<StatusBar
|
||||
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
||||
backgroundColor={backgroundStyle.backgroundColor}
|
||||
/>
|
||||
isSuccess ? <Navigation /> : <Login />
|
||||
</SafeAreaView>
|
||||
</NavigationContainer>
|
||||
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { setupPlayer } from "react-native-track-player/lib/src/trackPlayer";
|
||||
|
||||
/**
|
||||
* Sets up track player so it's ready for use
|
||||
*/
|
||||
export const usePlayer = useQuery({
|
||||
queryKey: [],
|
||||
queryFn: () => {
|
||||
|
||||
Reference in New Issue
Block a user