summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-07-16 08:51:35 +0700
committerpolwex <polwex@sortug.com>2025-07-16 08:51:35 +0700
commit697ed671f394cbd07ea9751fe17f262744d99a49 (patch)
tree4becdd805b31d326a26cc4589ebeddad061611e3 /app
parente2e14e414de25904d791b503d2852c68b3ac9415 (diff)
m
Diffstat (limited to 'app')
-rw-r--r--app/(tabs)/_layout.tsx81
-rw-r--r--app/(tabs)/login.tsx16
2 files changed, 46 insertions, 51 deletions
diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx
index cfbc1e2..a102c45 100644
--- a/app/(tabs)/_layout.tsx
+++ b/app/(tabs)/_layout.tsx
@@ -1,45 +1,54 @@
-import { Tabs } from 'expo-router';
-import React from 'react';
-import { Platform } from 'react-native';
+import { Tabs } from "expo-router";
+import { Toaster } from "react-hot-toast";
+import React from "react";
+import { Platform } from "react-native";
-import { HapticTab } from '@/components/HapticTab';
-import { IconSymbol } from '@/components/ui/IconSymbol';
-import TabBarBackground from '@/components/ui/TabBarBackground';
-import { Colors } from '@/constants/Colors';
-import { useColorScheme } from '@/hooks/useColorScheme';
+import { HapticTab } from "@/components/HapticTab";
+import { IconSymbol } from "@/components/ui/IconSymbol";
+import TabBarBackground from "@/components/ui/TabBarBackground";
+import { Colors } from "@/constants/Colors";
+import { useColorScheme } from "@/hooks/useColorScheme";
export default function TabLayout() {
const colorScheme = useColorScheme();
return (
- <Tabs
- screenOptions={{
- tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
- headerShown: false,
- tabBarButton: HapticTab,
- tabBarBackground: TabBarBackground,
- tabBarStyle: Platform.select({
- ios: {
- // Use a transparent background on iOS to show the blur effect
- position: 'absolute',
- },
- default: {},
- }),
- }}>
- <Tabs.Screen
- name="index"
- options={{
- title: 'Home',
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
+ <>
+ <Tabs
+ screenOptions={{
+ tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
+ headerShown: false,
+ tabBarButton: HapticTab,
+ tabBarBackground: TabBarBackground,
+ tabBarStyle: Platform.select({
+ ios: {
+ // Use a transparent background on iOS to show the blur effect
+ position: "absolute",
+ },
+ default: {},
+ }),
}}
- />
- <Tabs.Screen
- name="explore"
- options={{
- title: 'Explore',
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
- }}
- />
- </Tabs>
+ >
+ <Tabs.Screen
+ name="index"
+ options={{
+ title: "Home",
+ tabBarIcon: ({ color }) => (
+ <IconSymbol size={28} name="house.fill" color={color} />
+ ),
+ }}
+ />
+ <Tabs.Screen
+ name="explore"
+ options={{
+ title: "Explore",
+ tabBarIcon: ({ color }) => (
+ <IconSymbol size={28} name="paperplane.fill" color={color} />
+ ),
+ }}
+ />
+ </Tabs>
+ <Toaster position="top-center" />
+ </>
);
}
diff --git a/app/(tabs)/login.tsx b/app/(tabs)/login.tsx
index d09e613..c5f826d 100644
--- a/app/(tabs)/login.tsx
+++ b/app/(tabs)/login.tsx
@@ -19,7 +19,7 @@ import { Passkee } from "@/components/auth/Auth";
// import { createPasskey, isPasskeySupported } from "../lib/passkey";
// import { navigationRef } from "../lib/navigationRef";
-const PasskeySetupScreen = () => {
+const PasskeySetupScreen = async () => {
const [isLoading, setIsLoading] = useState(false);
// const isDarkMode = useSettingsStore((s) => s.isDarkMode);
const isDarkMode = false;
@@ -31,20 +31,6 @@ const PasskeySetupScreen = () => {
? require("../../assets/urbit-logo-dark.png")
: require("../../assets/urbit-logo-light.png");
- const handleCreatePasskey = async () => {
- console.log("creaing psskey");
- setIsLoading(true);
-
- try {
- // const res = await startRegistration({})
- } catch (error) {
- console.error("Passkey creation error:", error);
- Alert.alert("Error", "An error occurred while creating the passkey.");
- } finally {
- setIsLoading(false);
- }
- };
-
const handleSkip = () => {
// setHasSeenPasskeyPrompt(true);
// navigationRef.current?.navigate(ROUTES.LOGIN as never);