Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
fix(): fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Metnew committed Aug 9, 2017
1 parent 8e1eec3 commit 2895b4e
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 84 deletions.
6 changes: 3 additions & 3 deletions src/common/components/views/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default class Footer extends Component {
<Grid.Column width={12} mobile={16}>
<a href="https://github.com/Metnew/react-semantic.ui-starter">
<Header as="h3" inverted>
<Icon name="github"/>
<Icon name="github" />
<Header.Content>
React-Semantic.UI-Starter
React-Semantic.UI-Starter
<Header.Subheader>
Semantic.UI is cool, really.
Semantic.UI is cool, really.
</Header.Subheader>
</Header.Content>
</Header>
Expand Down
82 changes: 41 additions & 41 deletions src/common/components/views/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,47 @@ export default class Header extends Component {
return !isEqual(nextProps, this.props)
}

static propTypes = {
title: PropTypes.string,
toggleSidebar: PropTypes.func,
isLoggedIn: PropTypes.bool,
isMobile: PropTypes.bool
}
static propTypes = {
title: PropTypes.string,
toggleSidebar: PropTypes.func,
isLoggedIn: PropTypes.bool,
isMobile: PropTypes.bool
}

render () {
const {title, toggleSidebar, isLoggedIn, isMobile} = this.props
render () {
const {title, toggleSidebar, isLoggedIn, isMobile} = this.props

return (
<StyledHeader>
<HeaderInner>
{isLoggedIn &&
isMobile &&
<Navicon onClick={toggleSidebar}>
<Icon name="content"/>
</Navicon>}
<PageTitle>
{title}
</PageTitle>
<Spacer/>
<Popup
trigger={
<HeaderButton
id="header-button"
icon
as={'a'}
aria-label="github-header-link-button"
href="https://github.com/Metnew/react-semantic.ui-starter"
basic
circular
>
<Icon name="github" size="large" link fitted/>
</HeaderButton>
}
content={`${i18n('RSUIS on @Github')}`}
inverted
/>
</HeaderInner>
</StyledHeader>
)
}
return (
<StyledHeader>
<HeaderInner>
{isLoggedIn &&
isMobile &&
<Navicon onClick={toggleSidebar}>
<Icon name="content" />
</Navicon>}
<PageTitle>
{title}
</PageTitle>
<Spacer />
<Popup
trigger={
<HeaderButton
id="header-button"
icon
as={'a'}
aria-label="github-header-link-button"
href="https://github.com/Metnew/react-semantic.ui-starter"
basic
circular
>
<Icon name="github" size="large" link fitted />
</HeaderButton>
}
content={`${i18n('RSUIS on @Github')}`}
inverted
/>
</HeaderInner>
</StyledHeader>
)
}
}
68 changes: 34 additions & 34 deletions src/common/components/views/Root/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@ import theme from 'styles/theme'
import App from 'containers/App'
import RoutingWrapper from 'components/addons/RoutingWrapper'

const Router = process.env.BROWSER === true
? require('react-router-redux').ConnectedRouter
: require('react-router').StaticRouter
const Router =
process.env.BROWSER === true
? require('react-router-redux').ConnectedRouter
: require('react-router').StaticRouter

export default class Root extends Component {
static propTypes = {
store: PropTypes.object,
SSR: PropTypes.object,
history: PropTypes.object,
routes: PropTypes.array
}
static propTypes = {
store: PropTypes.object,
SSR: PropTypes.object,
history: PropTypes.object,
routes: PropTypes.array
}

static defaultProps = {
SSR: {}
}
static defaultProps = {
SSR: {}
}

componentWillMount () {
const {store} = this.props
store.dispatch({type: APPLICATION_INIT})
}
componentWillMount () {
const {store} = this.props
store.dispatch({type: APPLICATION_INIT})
}

render () {
const {SSR, store, history, routes} = this.props
const routerProps = process.env.BROWSER === true
render () {
const {SSR, store, history, routes} = this.props
const routerProps =
process.env.BROWSER === true
? {history}
: {location: SSR.location, context: SSR.context}
// key={Math.random()} = hack for HMR from https://github.com/webpack/webpack-dev-server/issues/395
return (
<Provider store={store} key={Math.random()}>
<ThemeProvider theme={theme}>
<Router {...routerProps} key={Math.random()}>

<App>
<RoutingWrapper store={store} routes={routes} />
</App>

</Router>
</ThemeProvider>
</Provider>
)
}
// key={Math.random()} = hack for HMR from https://github.com/webpack/webpack-dev-server/issues/395
return (
<Provider store={store} key={Math.random()}>
<ThemeProvider theme={theme}>
<Router {...routerProps} key={Math.random()}>
<App>
<RoutingWrapper store={store} routes={routes} />
</App>
</Router>
</ThemeProvider>
</Provider>
)
}
}
7 changes: 1 addition & 6 deletions src/common/components/views/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ export default class SidebarComponent extends Component {
return (
<StyledSidebar {...sidebarProps}>
<SidebarLogoContainer href="https://github.com/Metnew/react-semantic.ui-starter">
<SidebarLogo
src={logoImg}
alt="logo"
shape="circular"
centered
/>
<SidebarLogo src={logoImg} alt="logo" shape="circular" centered />
</SidebarLogoContainer>
{routes}
<Spacer />
Expand Down

0 comments on commit 2895b4e

Please sign in to comment.