minor fixes

This commit is contained in:
ammarahm-ed
2020-02-03 12:31:18 +05:00
parent 0ed20e5388
commit e43756ddff
4 changed files with 15 additions and 6 deletions

View File

@@ -332,9 +332,9 @@ export const ActionSheetComponent = ({
style={{ style={{
color: colors.accent, color: colors.accent,
}}> }}>
{tag.slice(0, 1)} #
</Text> </Text>
{tag.slice(1)} {tag}
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
); );

View File

@@ -331,7 +331,7 @@ export const Menu = ({
onPress={() => { onPress={() => {
close(); close();
NavigationService.navigate('Notes', { NavigationService.navigate('Notes', {
heading: item.title, title: item.title,
tag: item, tag: item,
type: 'tag', type: 'tag',
}); });

View File

@@ -113,7 +113,14 @@ export const Header = ({
color: colors.pri, color: colors.pri,
fontFamily: WEIGHT.bold, fontFamily: WEIGHT.bold,
}}> }}>
{heading} <Text
style={{
color: colors.accent,
}}>
{heading.slice(0, 1) === '#' ? '#' : null}
</Text>
{heading.slice(0, 1) === '#' ? heading.slice(1) : heading}
</Text> </Text>
</View> </View>
<View <View

View File

@@ -108,10 +108,12 @@ export const Notes = ({navigation}) => {
<Container <Container
bottomButtonText="Create a new note" bottomButtonText="Create a new note"
canGoBack={false} canGoBack={false}
heading={params.title} heading={'#' + params.title}
canGoBack={true} canGoBack={true}
data={notes} data={notes}
placeholder={`Search in ${params.title}`} placeholder={`Search in ${
params.type == 'tag' ? '#' + params.title : params.title
}`}
bottomButtonOnPress={() => {}}> bottomButtonOnPress={() => {}}>
<FlatList <FlatList
data={notes} data={notes}