Skip to content

Commit

Permalink
fix(mobile): Fix the non-smooth server address input field in signin
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Mar 30, 2024
1 parent 46b78ea commit a9c2181
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/mobile/app/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { api } from "@/lib/trpc";

export default function Signin() {
const { settings, setSettings } = useAppSettings();
const [serverAddress, setServerAddress] = useState(settings.address);

const [error, setError] = useState<string | undefined>();

Expand Down Expand Up @@ -66,10 +67,13 @@ export default function Signin() {
<Input
className="w-full"
placeholder="Server Address"
value={settings.address}
value={serverAddress}
autoCapitalize="none"
keyboardType="url"
onChangeText={(e) => setSettings({ ...settings, address: e })}
onChangeText={(e) => {
setServerAddress(e);
setSettings({ ...settings, address: e });
}}
/>
</View>
<View className="gap-2">
Expand All @@ -90,6 +94,8 @@ export default function Signin() {
placeholder="Password"
secureTextEntry
value={formData.password}
autoCapitalize="none"
textContentType="password"
onChangeText={(e) => setFormData((s) => ({ ...s, password: e }))}
/>
</View>
Expand Down

0 comments on commit a9c2181

Please sign in to comment.