-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alder Whiteford <[email protected]>
- Loading branch information
1 parent
f7c6e7c
commit 91a5dfb
Showing
49 changed files
with
2,433 additions
and
1,393 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,110 @@ | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import React from 'react'; | ||
import { StyleSheet, TouchableOpacity } from 'react-native'; | ||
import { SafeAreaView } from 'react-native-safe-area-context'; | ||
|
||
import { router } from 'expo-router'; | ||
|
||
import { | ||
IconDefinition, | ||
faHeart, | ||
faSignOutAlt, | ||
faUser | ||
} from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; | ||
import { Avatar } from '@rneui/base'; | ||
|
||
import { GlobalLayout } from '@/src/app/(design-system)/components/GlobalLayout/GlobalLayout'; | ||
|
||
import { Box, Colors, SACColors, Spacing, Text } from '../../(design-system)'; | ||
|
||
type ProfileItemProps = { | ||
icon: IconDefinition; | ||
text: string; | ||
textColor?: SACColors; | ||
onPress?: () => void; | ||
}; | ||
|
||
const ProfileItem = ({ icon, text, textColor, onPress }: ProfileItemProps) => ( | ||
<TouchableOpacity onPress={onPress}> | ||
<Box | ||
gap="l" | ||
paddingVertical="s" | ||
flexDirection="row" | ||
alignItems="center" | ||
> | ||
<FontAwesomeIcon | ||
size={24} | ||
color={textColor ? Colors.darkRed : Colors.gray} | ||
icon={icon} | ||
/> | ||
<Text color={textColor}>{text}</Text> | ||
</Box> | ||
</TouchableOpacity> | ||
); | ||
|
||
const ProfilePage = () => { | ||
return ( | ||
<GlobalLayout> | ||
<View style={styles.container}> | ||
<Text style={styles.title}>Profile</Text> | ||
</View> | ||
<SafeAreaView style={styles.container}> | ||
<Box | ||
paddingTop="xxl" | ||
flexDirection="row" | ||
gap="m" | ||
alignItems="center" | ||
> | ||
<Avatar | ||
source={{ | ||
uri: 'https://media1.popsugar-assets.com/files/thumbor/S6_lryTon-0orhMkLrw6m1yIFww=/1500x1500/filters:format_auto():quality(85):extract_cover()/2017/02/28/003/n/1922441/ace7eba458b602264e7940.39836479_edit_img_image_43244124_1488304081.jpg' | ||
}} | ||
size={60} | ||
rounded | ||
/> | ||
<Box flexDirection="column" gap="xxs"> | ||
<Text variant="subheader-2">Quokka</Text> | ||
<Text>[email protected]</Text> | ||
</Box> | ||
</Box> | ||
<Box width="100%"> | ||
<ProfileItem | ||
onPress={() => router.push('/user/detail/')} | ||
icon={faUser} | ||
text="Edit Profile" | ||
/> | ||
<ProfileItem | ||
icon={faHeart} | ||
onPress={() => router.push('/user/interest/')} | ||
text="Edit Interests" | ||
/> | ||
<Box | ||
width="100%" | ||
height={1} | ||
backgroundColor="gray" | ||
marginVertical="s" | ||
/> | ||
<ProfileItem | ||
icon={faSignOutAlt} | ||
text="Logout" | ||
textColor="darkRed" | ||
/> | ||
</Box> | ||
</SafeAreaView> | ||
</GlobalLayout> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
justifyContent: 'center' | ||
flexDirection: 'column', | ||
alignItems: 'flex-start', | ||
justifyContent: 'flex-start', | ||
marginVertical: Spacing.m, | ||
gap: Spacing.l | ||
}, | ||
title: { | ||
fontSize: 20, | ||
fontWeight: 'bold' | ||
}, | ||
separator: { | ||
marginVertical: 30, | ||
height: 1, | ||
width: '80%' | ||
fontWeight: 'bold', | ||
marginBottom: 20 | ||
} | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
import { Stack } from 'expo-router'; | ||
|
||
const Layout = () => { | ||
return ( | ||
<Stack> | ||
<Stack.Screen name="interest" options={{ headerShown: false }} /> | ||
<Stack.Screen | ||
name="detail" | ||
options={{ | ||
headerShown: false | ||
}} | ||
/> | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TouchableOpacity } from 'react-native-gesture-handler'; | ||
|
||
import { Text } from '@/src/app/(design-system)'; | ||
|
||
interface SaveProps { | ||
onPress: () => void; | ||
isValid: boolean; | ||
} | ||
|
||
export const Save: React.FC<SaveProps> = ({ onPress, isValid }) => { | ||
return ( | ||
<TouchableOpacity disabled={!isValid} onPress={onPress}> | ||
<Text color={isValid ? 'black' : 'darkGray'}>Save</Text> | ||
</TouchableOpacity> | ||
); | ||
}; |
Oops, something went wrong.