Skip to content

Commit

Permalink
refactor(layouts): nest layout components in their own directory
Browse files Browse the repository at this point in the history
fix(views): cleanup broken imports

fix(HomeView): cleanup broken imports
  • Loading branch information
David Zukowski committed Jan 8, 2016
1 parent bec4722 commit d226f75
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import '../styles/core.scss'
import '../../styles/core.scss'

// Note: Stateless/function components *will not* hot reload!
// react-transform *only* works on component classes.
Expand Down
6 changes: 3 additions & 3 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { Route, IndexRoute } from 'react-router'
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to files regardless of how deeply nested
// your current file is.
import CoreLayout from 'layouts/CoreLayout'
import HomeView from 'views/HomeView'
import AboutView from 'views/AboutView'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
import HomeView from 'views/HomeView/HomeView'
import AboutView from 'views/AboutView/AboutView'

export default (
<Route path='/' component={CoreLayout}>
Expand Down
2 changes: 1 addition & 1 deletion src/views/HomeView/HomeView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { actions as counterActions } from '../redux/modules/counter'
import { actions as counterActions } from '../../redux/modules/counter'
import styles from './HomeView.scss'

// We define mapStateToProps where we'd normally use
Expand Down
3 changes: 2 additions & 1 deletion tests/layouts/CoreLayout.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'

function shallowRender (component) {
const renderer = TestUtils.createRenderer()
Expand Down
3 changes: 2 additions & 1 deletion tests/views/HomeView.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import { bindActionCreators } from 'redux'
import { HomeView } from 'views/HomeView'
import { HomeView } from 'views/HomeView/HomeView'

function shallowRender (component) {
const renderer = TestUtils.createRenderer()
Expand Down

0 comments on commit d226f75

Please sign in to comment.