-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit * Fix width bugs * styling * adding preview cards * merging saved stories into branch * styling selector bar * finished styling * removed unused folders * Fix title preview card overflow * Fix featured stories extra space * Revert and useMemo to cache * Implement flatlist * Add default state to saved story button * Run prettier * Auto update reading list page * Finish library screen --------- Co-authored-by: Kyle Ramachandran <[email protected]> Co-authored-by: Aditya Pawar <[email protected]> Co-authored-by: Aditya Pawar <[email protected]>
- Loading branch information
1 parent
b88af9e
commit 14dbd0d
Showing
9 changed files
with
285 additions
and
48 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 +1,43 @@ | ||
import { StyleSheet } from 'react-native'; | ||
import colors from '../../../styles/colors'; | ||
|
||
const styles = StyleSheet.create({}); | ||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
alignItems: 'flex-start', | ||
justifyContent: 'flex-start', | ||
}, | ||
selector: { | ||
display: 'flex', | ||
width: '100%', | ||
flexDirection: 'row', | ||
justifyContent: 'space-around', | ||
backgroundColor: '#fbfbfb', | ||
marginBottom: 24, | ||
}, | ||
header: { | ||
paddingHorizontal: 24, | ||
marginBottom: 24, | ||
marginTop: 60, | ||
}, | ||
selectedText: { | ||
textAlign: 'center', | ||
color: colors.gwnOrange, | ||
paddingVertical: 8, | ||
}, | ||
unselectedText: { | ||
textAlign: 'center', | ||
color: colors.black, | ||
paddingVertical: 8, | ||
}, | ||
selectedButton: { | ||
borderBottomWidth: 1, | ||
borderBottomColor: colors.gwnOrange, | ||
}, | ||
scrollView: { | ||
width: '100%', | ||
}, | ||
}); | ||
|
||
export default styles; |
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,35 @@ | ||
import { View, Text, Image, Pressable } from 'react-native'; | ||
import { router } from 'expo-router'; | ||
import { useEffect, useState } from 'react'; | ||
import Icon from '../../../assets/icons'; | ||
|
||
import styles from './styles'; | ||
import globalStyles from '../../styles/globalStyles'; | ||
import colors from '../../styles/colors'; | ||
import { useSession } from '../../utils/AuthContext'; | ||
|
||
export default function LibraryHeader() { | ||
const { user } = useSession(); | ||
|
||
return ( | ||
<View style={styles.horizontal}> | ||
<View style={styles.textContainer}> | ||
<Image | ||
style={styles.image} | ||
source={require('../../../assets/icon.png')} | ||
/> | ||
<View style={styles.username}> | ||
<Text style={globalStyles.h1}>{user?.user_metadata.username} </Text> | ||
</View> | ||
</View> | ||
|
||
<View> | ||
<Pressable onPress={() => router.push('/settings')}> | ||
<View> | ||
<Icon type="settings_gear" /> | ||
</View> | ||
</Pressable> | ||
</View> | ||
</View> | ||
); | ||
} |
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,31 @@ | ||
import { StyleSheet } from 'react-native'; | ||
import colors from '../../styles/colors'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
display: 'flex', | ||
flexGrow: 1, | ||
width: '100%', | ||
}, | ||
image: { | ||
height: 51, | ||
width: 51, | ||
borderRadius: 51 / 2, | ||
marginBottom: 12, | ||
}, | ||
textContainer: { | ||
flexDirection: 'row', | ||
}, | ||
username: { | ||
paddingLeft: 12, | ||
}, | ||
horizontal: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
width: '100%', | ||
alignContent: 'center', | ||
}, | ||
}); | ||
|
||
export default styles; |
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
Oops, something went wrong.