disabling sign in if we're attempting to sign in

TRYING to get libraries to show up
This commit is contained in:
Violet Caulfield
2024-11-22 13:32:37 -06:00
parent 6bb6b1fc3c
commit bd9fd73e89
2 changed files with 5 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ export default function ServerAuthentication(): React.JSX.Element {
/>
<Button
disabled={_.isEmpty(username) || _.isEmpty(password)}
disabled={_.isEmpty(username) || _.isEmpty(password) || useApiMutation.isPending}
onPress={() => {
if (!_.isUndefined(username)) {

View File

@@ -45,11 +45,9 @@ export default function ServerLibrary(): React.JSX.Element {
<View marginHorizontal={10} flex={1} justifyContent='center'>
<Heading>Select Music Library</Heading>
{ isPending && (
{ isPending ? (
<ActivityIndicator />
)}
{ libraries &&
) : (
<ToggleGroup
orientation="vertical"
id="librarySelection"
@@ -57,13 +55,13 @@ export default function ServerLibrary(): React.JSX.Element {
type="single"
disableDeactivation={true}
>
{ libraries.map((library) => {
{ libraries!.map((library) => {
<ToggleGroup.Item value={library.Id!} aria-label={library.Name!}>
<Label htmlFor={library.Id!} size="$2">{library.Name!}</Label>
</ToggleGroup.Item>
})}
</ToggleGroup>
}
)}
{ isError && (
<Text>Unable to load libraries</Text>