tangled
alpha
login
or
join now
teal.fm
/
teal
110
fork
atom
Your music, beautifully tracked. All yours. (coming soon)
teal.fm
teal-fm
atproto
110
fork
atom
overview
issues
pulls
pipelines
be able to press enter when logging in
mmatt.net
1 year ago
0317a90f
eaa59d40
+12
-16
1 changed file
expand all
collapse all
unified
split
apps
amethyst
app
login.tsx
+12
-16
apps/amethyst/app/login.tsx
···
1
1
-
import React, { useEffect, useState } from "react";
2
2
-
import {
3
3
-
View,
4
4
-
TextInput,
5
5
-
TouchableOpacity,
6
6
-
Alert,
7
7
-
Linking,
8
8
-
Platform,
9
9
-
} from "react-native";
1
1
+
import { Link, Stack, router } from "expo-router";
2
2
+
import { AlertCircle, AtSign, Check, ChevronRight } from "lucide-react-native";
3
3
+
import React, { useState } from "react";
4
4
+
import { Platform, View } from "react-native";
10
5
import { SafeAreaView } from "react-native-safe-area-context";
11
11
-
import { Text } from "../components/ui/text";
12
6
import { Button } from "../components/ui/button";
13
13
-
import { Icon } from "../lib/icons/iconWithClassName";
14
14
-
import { Check, ChevronRight, AtSign, AlertCircle } from "lucide-react-native";
15
7
import { Input } from "../components/ui/input";
8
8
+
import { Text } from "../components/ui/text";
9
9
+
import { Icon } from "../lib/icons/iconWithClassName";
16
10
import { cn } from "../lib/utils";
17
17
-
import { Link, Stack, router } from "expo-router";
18
11
12
12
+
import { openAuthSessionAsync } from "expo-web-browser";
19
13
import { useStore } from "../stores/mainStore";
20
20
-
import createOAuthClient from "../lib/atp/oauth";
21
21
-
import { resolveFromIdentity } from "../lib/atp/pid";
22
22
-
import { openAuthSessionAsync } from "expo-web-browser";
23
14
24
15
const LoginScreen = () => {
25
16
const [handle, setHandle] = useState("");
···
139
130
onChangeText={setHandle}
140
131
autoCapitalize="none"
141
132
autoCorrect={false}
133
133
+
onKeyPress={(e) => {
134
134
+
if (e.nativeEvent.key === "Enter") {
135
135
+
handleLogin();
136
136
+
}
137
137
+
}}
142
138
/>
143
139
{err ? (
144
140
<Text className="text-red-500 justify-baseline mt-1 text-xs">