diff --git a/api/client.ts b/api/client.ts index 1187b3d0..661257c0 100644 --- a/api/client.ts +++ b/api/client.ts @@ -10,10 +10,10 @@ import { JellifyLibrary } from "../types/JellifyLibrary"; export default class Client { static #instance: Client; - private api : Api | undefined; - private user : JellifyUser | undefined; - private server : JellifyServer | undefined; - private library : JellifyLibrary | undefined; + private api : Api | undefined = undefined; + private user : JellifyUser | undefined = undefined; + private server : JellifyServer | undefined = undefined; + private library : JellifyLibrary | undefined = undefined; private sessionId : string = uuid.v4(); private constructor( diff --git a/components/Login/helpers/server-address.tsx b/components/Login/helpers/server-address.tsx index 70991de3..7b7d6ba7 100644 --- a/components/Login/helpers/server-address.tsx +++ b/components/Login/helpers/server-address.tsx @@ -2,10 +2,9 @@ import React, { useState } from "react"; import _ from "lodash"; import { useMutation } from "@tanstack/react-query"; import { JellifyServer } from "../../../types/JellifyServer"; -import { Spacer, Spinner, XStack, ZStack } from "tamagui"; +import { Input, Spacer, Spinner, XStack, ZStack } from "tamagui"; import { SwitchWithLabel } from "../../Global/helpers/switch-with-label"; import { H1 } from "../../Global/helpers/text"; -import Input from "../../Global/helpers/input"; import Button from "../../Global/helpers/button"; import { http, https } from "../utils/constants"; import { JellyfinInfo } from "../../../api/info"; @@ -76,8 +75,6 @@ export default function ServerAddress(): React.JSX.Element { setUsername(value)} + onChangeText={(value : string | undefined) => setUsername(value)} autoCapitalize="none" autoCorrect={false} /> setPassword(value)} + onChangeText={(value : string | undefined) => setPassword(value)} autoCapitalize="none" autoCorrect={false} secureTextEntry diff --git a/components/Login/helpers/server-library.tsx b/components/Login/helpers/server-library.tsx index f57e8a2d..d9039012 100644 --- a/components/Login/helpers/server-library.tsx +++ b/components/Login/helpers/server-library.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import { Spinner, Text, ToggleGroup } from "tamagui"; +import { Spinner, ToggleGroup } from "tamagui"; import { useAuthenticationContext } from "../provider"; -import { H1, Label } from "../../Global/helpers/text"; +import { H1, Label, Text } from "../../Global/helpers/text"; import Button from "../../Global/helpers/button"; import _ from "lodash"; import { useMusicLibraries, usePlaylistLibrary } from "../../../api/queries/libraries"; @@ -27,21 +27,24 @@ export default function ServerLibrary(): React.JSX.Element { { isPending ? ( ) : ( - - { libraries!.map((library) => { - return ( - - - - ) - })} - + <> + {/* @ts-ignore */} + + { libraries!.map((library) => { + return ( + + + + ) + })} + + )} { isError && (