From b7b28b3468c8f54eff9843ff8548aa0c3531f3cc Mon Sep 17 00:00:00 2001 From: Ahmed-Ayman Date: Wed, 5 Dec 2018 00:49:33 +0200 Subject: [PATCH] static-components scaffolding --- src/containers/Home.js | 50 ++++++++++++++++++----------- src/styleSheets/style.css | 0 src/subComponents/Footer.js | 9 ++++++ src/subComponents/Header.js | 9 ++++++ src/subComponents/RandomDate.js | 9 ++++++ src/subComponents/RandomLocation.js | 9 ++++++ src/subComponents/RandomTopic.js | 9 ++++++ src/subComponents/Search.js | 9 ++++++ 8 files changed, 86 insertions(+), 18 deletions(-) create mode 100644 src/styleSheets/style.css create mode 100644 src/subComponents/Footer.js create mode 100644 src/subComponents/Header.js create mode 100644 src/subComponents/RandomDate.js create mode 100644 src/subComponents/RandomLocation.js create mode 100644 src/subComponents/RandomTopic.js create mode 100644 src/subComponents/Search.js diff --git a/src/containers/Home.js b/src/containers/Home.js index f15c4f5..b287083 100644 --- a/src/containers/Home.js +++ b/src/containers/Home.js @@ -1,9 +1,13 @@ -import React, { Component } from 'react'; -import { Link } from 'react-router-dom'; -import { connect } from 'react-redux'; +import React from 'react'; +import {connect} from 'react-redux'; import testAction from '../actions/test'; import fetchVideos from '../actions/fetchVideos'; - +import Search from '../subComponents/Search'; +import Footer from '../subComponents/Footer'; +import RandomLocation from "../subComponents/RandomLocation"; +import RandomDate from "../subComponents/RandomDate"; +import RandomTopic from "../subComponents/RandomTopic"; +import Header from "../subComponents/Header"; class Home extends React.Component { clickBtn() { this.props.testAction('some new value'); @@ -12,22 +16,32 @@ class Home extends React.Component { render() { return (
- This is home. { this.props.test } -
- Go to topics -
-
- - -
-
- { this.props.loading && 'Loading...'} - { this.props.videos.map(video => { - return (
{ video.title }
); - })} -
+
+ + + + +
); + // + //
+ // This is home. {this.props.test} + //
+ // Go to topics + //
+ //
+ // + // + //
+ //
+ // {this.props.loading && 'Loading...'} + // {this.props.videos.map(video => { + // return (
{video.title}
); + // })} + //
+ //
+ } } diff --git a/src/styleSheets/style.css b/src/styleSheets/style.css new file mode 100644 index 0000000..e69de29 diff --git a/src/subComponents/Footer.js b/src/subComponents/Footer.js new file mode 100644 index 0000000..065a5d5 --- /dev/null +++ b/src/subComponents/Footer.js @@ -0,0 +1,9 @@ +import React from 'react'; +class Footer extends React.Component{ +render(){ + return( + 'hello Footer!' + ) +} +} +export default (Footer); \ No newline at end of file diff --git a/src/subComponents/Header.js b/src/subComponents/Header.js new file mode 100644 index 0000000..3a03537 --- /dev/null +++ b/src/subComponents/Header.js @@ -0,0 +1,9 @@ +import React from 'react'; +class Header extends React.Component{ +render(){ + return( + 'hello! header' + ) +} +} +export default (Header); \ No newline at end of file diff --git a/src/subComponents/RandomDate.js b/src/subComponents/RandomDate.js new file mode 100644 index 0000000..762fa04 --- /dev/null +++ b/src/subComponents/RandomDate.js @@ -0,0 +1,9 @@ +import React from 'react'; +class RandomDate extends React.Component{ +render(){ + return( + 'hello Dandom Date!' + ) +} +} +export default (RandomDate); \ No newline at end of file diff --git a/src/subComponents/RandomLocation.js b/src/subComponents/RandomLocation.js new file mode 100644 index 0000000..1493851 --- /dev/null +++ b/src/subComponents/RandomLocation.js @@ -0,0 +1,9 @@ +import React from 'react'; +class RandomLocation extends React.Component{ +render(){ + return( + 'hello Random Location!' + ) +} +} +export default (RandomLocation); \ No newline at end of file diff --git a/src/subComponents/RandomTopic.js b/src/subComponents/RandomTopic.js new file mode 100644 index 0000000..b758788 --- /dev/null +++ b/src/subComponents/RandomTopic.js @@ -0,0 +1,9 @@ +import React from 'react'; +class RandomTopic extends React.Component{ +render(){ + return( + 'hello Random Topic!' + ) +} +} +export default (RandomTopic); \ No newline at end of file diff --git a/src/subComponents/Search.js b/src/subComponents/Search.js new file mode 100644 index 0000000..25a6ea5 --- /dev/null +++ b/src/subComponents/Search.js @@ -0,0 +1,9 @@ +import React from 'react'; +class Search extends React.Component{ +render(){ + return( + 'hello Search!' + ) +} +} +export default (Search); \ No newline at end of file