1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
import "server-only";
import {
View,
Text,
StyleSheet,
Image,
KeyboardAvoidingView,
Platform,
Alert,
} from "react-native";
import PrimaryButton from "@/components/PrimaryButton";
import ScreenWrapper from "@/components/ScreenWrapper";
// // import { useThemeColors, ColorScheme } from "../constants";
// import { ROUTES } from "@/constants/routes";
// import { Passkee } from "@/components/auth/Auth";
import { type ColorScheme, lightColors } from "@/constants";
import { ShipForm } from "@/components/login/ShipCredsForm";
// // import { useSettingsStore } from "../store/useSettingsStore";
// // import useAuthStore from "../store/useAuthStore";
// // import { createPasskey, isPasskeySupported } from "../lib/passkey";
// // import { navigationRef } from "../lib/navigationRef";
// const PasskeySetupScreen = async () => {
// // const isDarkMode = useSettingsStore((s) => s.isDarkMode);
// const isDarkMode = false;
// // const colors = useThemeColors();
// const colors = lightColors;
// const styles = getStyles(colors);
// // const { setHasPasskey, setHasSeenPasskeyPrompt } = useAuthStore();
// const logoSource = isDarkMode
// ? require("../assets/urbit-logo-dark.png")
// : require("../assets/urbit-logo-light.png");
// const handleSkip = () => {
// // setHasSeenPasskeyPrompt(true);
// // navigationRef.current?.navigate(ROUTES.LOGIN as never);
// };
// return (
// <KeyboardAvoidingView
// style={styles.container}
// behavior={Platform.OS === "ios" ? "padding" : undefined}
// >
// <ScreenWrapper>
// <View style={styles.topSection}>
// <Image
// source={logoSource}
// style={styles.walletIcon}
// resizeMode="contain"
// />
// <Text style={styles.title}>Secure Your Wallet</Text>
// <Text style={styles.subtitle}>
// Create a passkey for easy and secure access to your Urbit wallet
// </Text>
// </View>
// <View style={styles.bottomSection}>
// <Passkee />
// <PrimaryButton
// label="Skip for Now"
// onPress={handleSkip}
// style={{
// backgroundColor: colors.card,
// borderWidth: 1,
// borderColor: colors.border,
// }}
// textStyle={{ color: colors.text }}
// />
// <Text style={styles.infoText}>
// You can always set up a passkey later in settings
// </Text>
// </View>
// </ScreenWrapper>
// </KeyboardAvoidingView>
// );
// };
// export const getStyles = (colors: ColorScheme) =>
// StyleSheet.create({
// container: {
// flex: 1,
// backgroundColor: colors.background,
// justifyContent: "space-between",
// padding: 20,
// },
// topSection: {
// flex: 1,
// justifyContent: "center",
// alignItems: "center",
// },
// walletIcon: {
// width: 64,
// height: 64,
// marginBottom: 24,
// },
// title: {
// fontSize: 24,
// color: colors.text,
// fontWeight: "600",
// marginBottom: 12,
// textAlign: "center",
// },
// subtitle: {
// fontSize: 16,
// color: colors.secondary,
// textAlign: "center",
// paddingHorizontal: 20,
// lineHeight: 24,
// },
// bottomSection: {
// marginBottom: 40,
// },
// infoText: {
// color: colors.secondary,
// fontSize: 14,
// textAlign: "center",
// marginTop: 16,
// },
// });
// export default PasskeySetupScreen;
//
//
// export const unstable_settings = {
// // This component will be rendered at build-time and never re-rendered in production.
// render: "static",
// };
export default async function Index() {
async function handleSubmit() {
//
}
return (
<View style={styles.container}>
<ScreenWrapper>
<View style={styles.topSection}>
<Image
source={require("../assets/urbit-logo-light.png")}
style={styles.walletIcon}
resizeMode="contain"
/>
<Text style={styles.title}>Secure Your Wallet</Text>
<Text style={styles.subtitle}>
Create a passkey for easy and secure access to your Urbit wallet
</Text>
</View>
<ShipForm />
<View style={styles.bottomSection}>
<Text style={styles.infoText}>
You can always set up a passkey later in settings
</Text>
</View>
</ScreenWrapper>
</View>
);
}
export const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F7F7F7",
justifyContent: "space-between",
padding: 20,
},
topSection: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
walletIcon: {
width: 64,
height: 64,
marginBottom: 24,
},
title: {
fontSize: 24,
color: "#171717",
fontWeight: "600",
marginBottom: 12,
textAlign: "center",
},
subtitle: {
fontSize: 16,
color: "#737373",
textAlign: "center",
paddingHorizontal: 20,
lineHeight: 24,
},
bottomSection: {
marginBottom: 40,
},
infoText: {
color: "#737373",
fontSize: 14,
textAlign: "center",
marginTop: 16,
},
});
|