Display selected tag name in the Tags screen header

This commit is contained in:
Adolfo Reyna
2025-02-28 00:35:22 -05:00
parent 8cdcfefa0d
commit fe9fc8e3e4

View File

@@ -1,12 +1,8 @@
import { StatusBar } from 'expo-status-bar';
import React, { useState, useEffect } from 'react';
import { View, ActivityIndicator, StyleSheet, SafeAreaView, FlatList } from 'react-native';
import { Button, IconButton } from 'react-native-paper';
import { View, Text, StyleSheet, SafeAreaView, FlatList } from 'react-native';
import API from './../API.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 [Posts, setPosts] = useState([]);
@@ -38,7 +34,9 @@ let Tags = ({ navigation, route }) => {
const header = (
<View>
<Text style={{ fontSize: 20, fontWeight: 'bold', padding: 10, alignContent: 'center', textAlign: 'center' }}>
#{route.params.tag}
</Text>
</View>
)