Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/(auth)/(home)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ function HomeLayout() {
tabBarButton: (props) => <TabBarButton {...props} />,
}}
>
<Tabs.Screen
name="index"
options={{
headerShown: false,
href: null,
}}
/>
<Tabs.Screen
name="projects"
options={{
Expand Down
52 changes: 19 additions & 33 deletions app/(auth)/(home)/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from 'react';
import { useTranslation } from 'react-i18next';
import {
Alert,
Linking,
RefreshControl,
ScrollView,
Expand All @@ -27,6 +26,7 @@ import InlineListView from '@/components/InlineListView';
import Page from '@/components/Page';
import ProfileHeader from '@/components/ProfileHeader';
import ProfileStats from '@/components/ProfileStats';
import showConfirm from '@/components/showConfirm';
import Text from '@/components/Text';
import { showAlert } from '@/components/Toast';
import {
Expand Down Expand Up @@ -158,26 +158,21 @@ function Profile() {
}, []);

const onHandleSignoutClick = useCallback(() => {
Alert.alert('Sign Out', 'Are you sure you want to sign out?', [
{
text: 'Cancel',
style: 'cancel',
},
{
text: 'OK',
style: 'destructive',
onPress: () => {
firebaseAuth.signOut().catch((error) => {
showAlert({
title: 'Sign out error',
message: error,
alertType: 'error',
});
showConfirm({
title: 'Sign Out',
message: 'Are you sure you want to sign out?',
onConfirm: () => {
firebaseAuth.signOut().catch((error) => {
showAlert({
title: 'Sign out error',
message: error,
alertType: 'error',
});
router.replace('/');
},
});
router.replace('/');
},
]);
destructive: true,
});
}, [router]);

const handleResetPress = useCallback(async () => {
Expand All @@ -201,20 +196,11 @@ function Profile() {
}, [handleAsync, user, t]);

const handleResetPasswordClick = useCallback(() => {
Alert.alert(
'Reset Password',
'An email will be sent to your account with the reset link. Are you sure you want to continue?',
[
{
text: 'Cancel',
style: 'cancel',
},
{
text: 'OK',
onPress: handleResetPress,
},
],
);
showConfirm({
title: 'Reset Password',
message: 'An email will be sent to your account with the reset link. Are you sure you want to continue?',
onConfirm: handleResetPress,
});
}, [handleResetPress]);

const settingItems: ButtonLayoutProps[] = [
Expand Down
3 changes: 2 additions & 1 deletion app/(auth)/(home)/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
PROJECT_TYPE_COMPARE,
PROJECT_TYPE_COMPLETENESS,
PROJECT_TYPE_FIND,
PROJECT_TYPE_LOCATE_FEATURES,
PROJECT_TYPE_STREET,
PROJECT_TYPE_VALIDATE,
PROJECT_TYPE_VALIDATE_IMAGE,
Expand Down Expand Up @@ -90,7 +91,6 @@ const createProjectStyles = (_: AppTheme, { featured }: { featured: boolean }) =
},
projectImage: {
height: 220,
aspectRatio: 1,
},
overlay: {
top: 0,
Expand Down Expand Up @@ -147,6 +147,7 @@ const projectTypeTextMapping: Record<FbProject['projectType'], string> = {
[PROJECT_TYPE_VALIDATE]: 'validate',
[PROJECT_TYPE_STREET]: 'street',
[PROJECT_TYPE_VALIDATE_IMAGE]: 'validate image',
[PROJECT_TYPE_LOCATE_FEATURES]: 'locate features',
};

interface ProjectItemProps {
Expand Down
14 changes: 5 additions & 9 deletions app/(auth)/exploreGroup/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React, {
} from 'react';
import { useTranslation } from 'react-i18next';
import {
Alert,
Linking,
RefreshControl,
ScrollView,
Expand All @@ -29,6 +28,7 @@ import Icon from '@/components/Icon';
import InfoCard, { StatsInfo } from '@/components/InfoCard';
import InlineListView from '@/components/InlineListView';
import Page from '@/components/Page';
import showConfirm from '@/components/showConfirm';
import Text from '@/components/Text';
import { showAlert } from '@/components/Toast';
import {
Expand Down Expand Up @@ -239,14 +239,10 @@ function ExploreGroup() {
});
}
};
Alert.alert(
isJoin ? 'Join User Group' : 'Leave User Group',
message,
[
{ text: 'Cancel', style: 'cancel' },
{ text: 'OK', onPress: proceed },
],
);
showConfirm({
title: isJoin ? 'Join User Group' : 'Leave User Group',
onConfirm: proceed,
});
},
[userId, userGroupId, router],
);
Expand Down
1 change: 1 addition & 0 deletions app/(auth)/project/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const createStyles = (theme: AppTheme) => StyleSheet.create({
},
contributionText: {
color: theme.card,
flexShrink: 1,
},
bottomBar: {
borderTopWidth: 1,
Expand Down
Loading
Loading