Skip to content

Commit

Permalink
built tab nav structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxnelson997 committed Jun 12, 2018
1 parent 7149cdf commit 92b81ee
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from 'react';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
Expand All @@ -11,23 +11,17 @@ const createStoreWithMiddleware = applyMiddleware(reduxThunk)(compose((window.de
// import 'bootstrap/dist/css/bootstrap.css';
import './style/main.scss';

import history from './history';

import Layout from './components/layout';

// AUTH
import requireAuth from './components/requireAuth';
import Signup from './components/auth/signup';
import Signin from './components/auth/signin';

import history from './history';
import requireAuth from './components/requireAuth';

class Dashboard extends Component {
render() {
return (
<div>
hey there
</div>
)
}
}
// DASHBOARD
import Dashboard from './components/dashboard';

function main() {
ReactDOM.render(
Expand Down
32 changes: 32 additions & 0 deletions src/components/dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { Component } from "react";

import TabNav from './tabnav';

class Dashboard extends Component {

constructor(props) {
super(props);

this.state = {
tabs: [
{
title: 'Newsletter',
active: false,
component: <h4>Hey There - Newsletter</h4>
},
{
title: 'Requests',
active: false,
component: <h4>Hey There - Requests</h4>
},
]
}
}

render() {
return <TabNav tabs={this.state.tabs}/>
}

}

export default Dashboard;
17 changes: 17 additions & 0 deletions src/components/tabnav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { Component } from 'react';

class TabNav extends Component {
render() {
var JSX = [
<h1>TABS</h1>
];

this.props.tabs.map((tab, index) => {
JSX.push(tab.component);
})

return JSX;
}
}

export default TabNav;

0 comments on commit 92b81ee

Please sign in to comment.