mirror of
https://github.com/array-in-a-matrix/foodie.git
synced 2025-04-02 10:32:08 -04:00
32 lines
860 B
JavaScript
32 lines
860 B
JavaScript
import React from "react";
|
|
// import { useState, useEffect } from "react";
|
|
import { useContext } from "react";
|
|
import RecipeVid from "../recipe_vid/RecipeVid";
|
|
|
|
import RecipeList from "../store/recipe-context"
|
|
|
|
function VideoPlayer() {
|
|
const loadedRecipe = useContext(RecipeList).recipeList;
|
|
|
|
const recipesList = loadedRecipe.map((recipe) => (
|
|
<RecipeVid
|
|
id={recipe.id}
|
|
recipename={recipe.name}
|
|
vid={recipe.vid}
|
|
thumbnail={recipe.pic}
|
|
ingredients={recipe.ingredients}
|
|
username={recipe.userName}
|
|
userpf={recipe.userPf} //? user profile picture
|
|
description={recipe.discription}/> //? i misspelled description in firebase
|
|
));
|
|
|
|
return (
|
|
<section>
|
|
<h1>Video Here</h1>
|
|
<div>{ recipesList[0]
|
|
}</div>
|
|
</section>
|
|
);
|
|
}
|
|
|
|
export default VideoPlayer;
|