Display selected tag name in the Tags screen header
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
import { StatusBar } from 'expo-status-bar';
|
import { StatusBar } from 'expo-status-bar';
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { View, ActivityIndicator, StyleSheet, SafeAreaView, FlatList } from 'react-native';
|
import { View, Text, StyleSheet, SafeAreaView, FlatList } from 'react-native';
|
||||||
import { Button, IconButton } from 'react-native-paper';
|
|
||||||
import API from './../API.js';
|
import API from './../API.js';
|
||||||
import Post from './../components/Post.js';
|
import Post from './../components/Post.js';
|
||||||
import NewPost from "./../components/NewPost.js";
|
|
||||||
import ProfileHeader from '../components/ProfileHeader.js';
|
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
||||||
|
|
||||||
let Tags = ({ navigation, route }) => {
|
let Tags = ({ navigation, route }) => {
|
||||||
let [Posts, setPosts] = useState([]);
|
let [Posts, setPosts] = useState([]);
|
||||||
@@ -38,7 +34,9 @@ let Tags = ({ navigation, route }) => {
|
|||||||
|
|
||||||
const header = (
|
const header = (
|
||||||
<View>
|
<View>
|
||||||
|
<Text style={{ fontSize: 20, fontWeight: 'bold', padding: 10, alignContent: 'center', textAlign: 'center' }}>
|
||||||
|
#{route.params.tag}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user