Reddit client - can´t render videos or text

Hi everyone, i´m stuck at this point where i connected my project with the api but i can´t get videos or text on the reddit posts, i used post.url but it only renders pictures. Here its my App component and the screenshot of how it looks. Thanks in advance!

import ‘./App.css’;
import { useEffect, useState } from ‘react’;
import Header from ‘./Componentes/header/header’;
import SearchCategories from ‘./Componentes/searchcategories/searchcategories’;
import Post from ‘./Componentes/post/post’;
import PopularComments from ‘./Componentes/popularcoments/popularcomments’;
import { library } from ‘@fortawesome/fontawesome-svg-core’;
import { fas } from ‘@fortawesome/free-solid-svg-icons’;
import { getSubredditPosts } from ‘./api/reddit’;
library.add(fas);

function App() {
const [posts, setPosts] = useState(); //estado para almacenar los posts

useEffect(() => {
const fetchPopularPosts = async () => {
try {
const popularPosts = await getSubredditPosts(‘/r/popular/’);
setPosts(popularPosts); // Almacena los posts en el estado
} catch (error) {
console.error(‘Error al obtener los posts populares:’, error);
}
};

fetchPopularPosts(); // Llama a la función para obtener los posts populares

}, ); // se ejecute solo cuando el componente se monta
console.log(posts)
return (
<>









{posts.map((post) => (

))}





</>

);
}

export default App;

Because it’s different keys.

You need to check, what is type of data every post have, video, pictures, and after checking drawing it in your component

i know but, i don´t know how to put only one for all the types, i mean, img, video or text.
In the reddit api exists url, thumbnail, permalink and other properties for each kind of media.

You need to check if that post have key with video content - show this content, else - show other type of content (img)