-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from OrcaPracticas/develop
ADD: Integrandi redux en el proyecto platzi video
- Loading branch information
Showing
7 changed files
with
324 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,146 +1,145 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"id": 1, | ||
"description": "Lo mejor de la semana", | ||
"title": "Destacados", | ||
"playlist": [ | ||
"categories": [ | ||
{ | ||
"title": "¿Qué es responsive Design?", | ||
"author": "LeonidasEsteban", | ||
"type": "video", | ||
"cover": "./images/covers/responsive.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 1 | ||
"id": "1", | ||
"description": "Lo mejor de la semana", | ||
"title": "Destacados", | ||
"playlist": [ | ||
{ | ||
"title": "¿Qué es responsive Design?", | ||
"author": "LeonidasEsteban", | ||
"type": "video", | ||
"cover": "./images/covers/responsive.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "1" | ||
}, | ||
{ | ||
"title": "Cómo optimzar la carga de un website", | ||
"author": "LeonidasEsteban", | ||
"type": "video", | ||
"cover": "./images/covers/optimizar.jpg", | ||
"src": "http://peach.themazzone.com/durian/movies/sintel-1024-surround.mp4", | ||
"id": "2" | ||
}, | ||
{ | ||
"title": "Qué es Bitcoin", | ||
"author": "Yograterol", | ||
"type": "video", | ||
"cover": "./images/covers/bitcoin.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "3" | ||
}, | ||
{ | ||
"title": "Que pasó con HTML5", | ||
"author": "Freddier", | ||
"type": "video", | ||
"cover": "./images/covers/html5.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "4" | ||
}, | ||
{ | ||
"title": "Lo mejor de Mejorando.la", | ||
"author": "Cvander", | ||
"type": "video", | ||
"cover": "./images/covers/mejorandola.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "5" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Cómo optimzar la carga de un website", | ||
"author": "LeonidasEsteban", | ||
"type": "video", | ||
"cover": "./images/covers/optimizar.jpg", | ||
"src": "http://peach.themazzone.com/durian/movies/sintel-1024-surround.mp4", | ||
"id": 2 | ||
"id": "2", | ||
"description": "Lo mejor para concentrarte", | ||
"title": "Para programar", | ||
"playlist": [ | ||
{ | ||
"title": "One more time", | ||
"author": "Daft Punk", | ||
"type": "video", | ||
"cover": "./images/covers/one-more-time.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "6" | ||
}, | ||
{ | ||
"title": "Midnight City", | ||
"author": "M83", | ||
"type": "video", | ||
"cover": "./images/covers/midnight.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "7" | ||
}, | ||
{ | ||
"title": "Solar Sailer", | ||
"author": "Daft Punk", | ||
"type": "video", | ||
"cover": "./images/covers/solar-sailer.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "8" | ||
}, | ||
{ | ||
"title": "The social network", | ||
"author": "The social network", | ||
"type": "video", | ||
"cover": "./images/covers/social.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "9" | ||
}, | ||
{ | ||
"title": "No vaya a ser", | ||
"author": "Pablo Alboran", | ||
"type": "video", | ||
"cover": "./images/covers/no-vaya-a-ser.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "10" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Qué es Bitcoin", | ||
"author": "Yograterol", | ||
"type": "video", | ||
"cover": "./images/covers/bitcoin.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 3 | ||
}, | ||
{ | ||
"title": "Que pasó con HTML5", | ||
"author": "Freddier", | ||
"type": "video", | ||
"cover": "./images/covers/html5.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 4 | ||
}, | ||
{ | ||
"title": "Lo mejor de Mejorando.la", | ||
"author": "Cvander", | ||
"type": "video", | ||
"cover": "./images/covers/mejorandola.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"id": 2, | ||
"description": "Lo mejor para concentrarte", | ||
"title": "Para programar", | ||
"playlist": [ | ||
{ | ||
"title": "One more time", | ||
"author": "Daft Punk", | ||
"type": "video", | ||
"cover": "./images/covers/one-more-time.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 1 | ||
}, | ||
{ | ||
"title": "Midnight City", | ||
"author": "M83", | ||
"type": "video", | ||
"cover": "./images/covers/midnight.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 5 | ||
}, | ||
{ | ||
"title": "Solar Sailer", | ||
"author": "Daft Punk", | ||
"type": "video", | ||
"cover": "./images/covers/solar-sailer.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 2 | ||
}, | ||
{ | ||
"title": "The social network", | ||
"author": "The social network", | ||
"type": "video", | ||
"cover": "./images/covers/social.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 4 | ||
}, | ||
{ | ||
"title": "No vaya a ser", | ||
"author": "Pablo Alboran", | ||
"type": "video", | ||
"cover": "./images/covers/no-vaya-a-ser.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"id": 3, | ||
"description": "Si no te queda de otra", | ||
"title": "Regueton", | ||
"playlist": [ | ||
{ | ||
"title": "Despacito", | ||
"author": "Luis Fonsi", | ||
"type": "video", | ||
"cover": "./images/covers/despacito.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 1 | ||
}, | ||
{ | ||
"title": "Echame la culpa", | ||
"author": "Luis fonsi", | ||
"type": "video", | ||
"cover": "./images/covers/echame-la-culpa.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 3 | ||
}, | ||
{ | ||
"title": "Mi Gente", | ||
"author": "J Bavil", | ||
"type": "video", | ||
"cover": "./images/covers/mi-gente.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 2 | ||
}, | ||
{ | ||
"title": "Felices los 4", | ||
"author": "Maluma", | ||
"type": "video", | ||
"cover": "./images/covers/felices.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 4 | ||
}, | ||
{ | ||
"title": "Me Rehúso", | ||
"author": "Danny Ocean", | ||
"type": "video", | ||
"cover": "./images/covers/rehuso.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": 5 | ||
"id": "3", | ||
"description": "Si no te queda de otra", | ||
"title": "Regueton", | ||
"playlist": [ | ||
{ | ||
"title": "Despacito", | ||
"author": "Luis Fonsi", | ||
"type": "video", | ||
"cover": "./images/covers/despacito.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "11" | ||
}, | ||
{ | ||
"title": "Echame la culpa", | ||
"author": "Luis fonsi", | ||
"type": "video", | ||
"cover": "./images/covers/echame-la-culpa.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "12" | ||
}, | ||
{ | ||
"title": "Mi Gente", | ||
"author": "J Bavil", | ||
"type": "video", | ||
"cover": "./images/covers/mi-gente.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "13" | ||
}, | ||
{ | ||
"title": "Felices los 4", | ||
"author": "Maluma", | ||
"type": "video", | ||
"cover": "./images/covers/felices.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "14" | ||
}, | ||
{ | ||
"title": "Me Rehúso", | ||
"author": "Danny Ocean", | ||
"type": "video", | ||
"cover": "./images/covers/rehuso.jpg", | ||
"src": "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", | ||
"id": "15" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import React from 'react'; | ||
import Category from './category'; | ||
import './categories.css'; | ||
import Search from '../../widgets/containers/search'; | ||
import React from "react"; | ||
import Category from "./category"; | ||
import "./categories.css"; | ||
import Search from "../../widgets/containers/search"; | ||
import Media from "../../playlist/components/media"; | ||
|
||
function Categories(props) { | ||
return ( | ||
<div className="Categories"> | ||
<Search /> | ||
{ | ||
props.categories.map((item) =>{ | ||
return ( | ||
<Category | ||
key={item.id} | ||
{...item} | ||
handleOpenModal={props.handleOpenModal} | ||
/> | ||
) | ||
}) | ||
} | ||
</div> | ||
) | ||
return ( | ||
<div className="Categories"> | ||
<Search /> | ||
{ | ||
props.search.map(item => <Media key={item.id} {...item} />) | ||
} | ||
{ | ||
props.categories.map(item => ( | ||
<Category | ||
key={item.id} | ||
{...item} | ||
handleOpenModal={props.handleOpenModal} | ||
/> | ||
)) | ||
} | ||
</div> | ||
); | ||
} | ||
|
||
export default Categories | ||
export default Categories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
import React from 'react'; | ||
import { hydrate } from 'react-dom'; | ||
import Home from '../pages/containers/home'; | ||
// import Playlist from './src/playlist/components/playlist'; | ||
import data from '../api.json'; | ||
// console.log('Hola mundo!' ) | ||
import React from "react"; | ||
import { createStore } from "redux"; | ||
import { Provider } from "react-redux"; | ||
import { hydrate } from "react-dom"; | ||
import Home from "../pages/containers/home"; | ||
import data from "../api.json"; | ||
import reducer from "../reducers/data"; | ||
|
||
const homeContainer = document.getElementById('home-container') | ||
/** | ||
* Creando store | ||
*/ | ||
const INITIAL_STATE = { | ||
data, | ||
search: [], | ||
}; | ||
|
||
// ReactDOM.render(que voy a renderizar, donde lo haré); | ||
// const holaMundo = <h1>hola Estudiante!</h1>; | ||
hydrate( <Home data={data} />, homeContainer); | ||
const STORE = createStore( | ||
reducer, | ||
INITIAL_STATE, | ||
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(), | ||
); | ||
|
||
const homeContainer = document.getElementById("home-container"); | ||
hydrate( | ||
<Provider store={STORE}> | ||
<Home /> | ||
</Provider>, homeContainer, | ||
); |
Oops, something went wrong.