mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-10 21:09:57 -06:00
OMFG
Did you RTFM
This commit is contained in:
8
App.tsx
8
App.tsx
@@ -1,16 +1,22 @@
|
||||
import './gesture-handler';
|
||||
import React from 'react';
|
||||
import defaultConfig from '@tamagui/config/v3'
|
||||
|
||||
import Jellify from './components/jellify';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { createTamagui, TamaguiProvider } from 'tamagui';
|
||||
|
||||
export default function App(): React.JSX.Element {
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
const config = createTamagui(defaultConfig)
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Jellify />
|
||||
<TamaguiProvider config={config}>
|
||||
<Jellify />
|
||||
</TamaguiProvider>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { validateServerUrl } from "../utils/validation";
|
||||
import { useServerUrl as serverUrlMutation } from "../../../api/mutators/storage";
|
||||
import _ from "lodash";
|
||||
import { Button, Input, YStack } from "tamagui";
|
||||
|
||||
@@ -9,13 +11,12 @@ export default function ServerAddress(): React.JSX.Element {
|
||||
return (
|
||||
<YStack>
|
||||
<Input placeholder="Jellyfin Server Address"
|
||||
// onChangeText={(value) => validateServerUrl(value) ?? setServerUrl(value)}
|
||||
onChangeText={(value) => validateServerUrl(value) ?? setServerUrl(value)}
|
||||
></Input>
|
||||
|
||||
<Button
|
||||
// onPress={(event) => serverUrlMutation.mutate(serverUrl)}
|
||||
// disabled={_.isEmpty(serverUrl)}
|
||||
>
|
||||
onPress={(event) => serverUrlMutation.mutate(serverUrl)}
|
||||
disabled={_.isEmpty(serverUrl)}>
|
||||
Connect
|
||||
</Button>
|
||||
</YStack>
|
||||
|
||||
Reference in New Issue
Block a user