mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-21 09:08:56 -05:00
add tamagui
fix server url validation setup
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { View, TextInput, Button, StyleSheet } from "react-native";
|
||||
import { handleServerUrlChangeEvent } from "../utils/handlers";
|
||||
import { useServerUrl } from "@/api/queries";
|
||||
import { validateServerUrl } from "../utils/validation";
|
||||
import { useServerUrl as serverUrlMutation } from "../../../api/mutators/storage";
|
||||
@@ -27,7 +26,7 @@ export default function ServerAddress(): React.JSX.Element {
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
value={serverUrl}
|
||||
onChangeText={(value) => handleServerUrlChangeEvent(value, setServerUrl)}
|
||||
onChangeText={(value) => validateServerUrl(value) ?? setServerUrl(value)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { validateServerUrl } from "./validation";
|
||||
|
||||
export function handleServerUrlChangeEvent(serverUrl: string | undefined, setServerUrl: React.Dispatch<React.SetStateAction<string | undefined>>) : void {
|
||||
if (validateServerUrl(serverUrl)) {
|
||||
setServerUrl(serverUrl);
|
||||
}
|
||||
}
|
||||
Generated
+1698
-1
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -17,6 +17,7 @@
|
||||
"@react-native-community/masked-view": "^0.1.11",
|
||||
"@react-navigation/native": "^6.1.18",
|
||||
"@react-navigation/stack": "^6.4.1",
|
||||
"@tamagui/config": "^1.115.0",
|
||||
"@tanstack/react-query": "^5.52.1",
|
||||
"lodash": "^4.17.21",
|
||||
"react": "18.3.1",
|
||||
@@ -28,7 +29,8 @@
|
||||
"react-native-safe-area-context": "^4.11.0",
|
||||
"react-native-screens": "^3.34.0",
|
||||
"react-native-track-player": "^4.1.1",
|
||||
"react-native-vector-icons": "^10.1.0"
|
||||
"react-native-vector-icons": "^10.1.0",
|
||||
"tamagui": "^1.115.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
|
||||
Reference in New Issue
Block a user