Skip to content

Commit

Permalink
Add Fragment in AccountPage (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Dias authored Jun 25, 2018
1 parent 5ecfbb3 commit a24e397
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Add `pagesPath` prop to the container of `SearchPage` and `CategoryPage`.

## [0.2.9] - 2018-6-25
### Fixed
- Add `Fragment` in `AccountPage`.

## [0.2.9] - 2018-6-25
### Fixed
- Add route `account/orders` again.

Expand Down
13 changes: 10 additions & 3 deletions react/AccountPage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from 'react'
import React, { Component, Fragment } from 'react'
import PropTypes from 'prop-types'
import { ExtensionPoint } from 'render'

Expand All @@ -7,13 +7,20 @@ export default class AccountPage extends Component {
prefetchPage: PropTypes.func,
}

static propTypes = {
children: PropTypes.element,
}

componentDidMount() {
this.context.prefetchPage('store/home')
}

render() {
return (
<ExtensionPoint id="container" />
<Fragment>
<ExtensionPoint id="container" />
<div className="vtex-account__template">{this.props.children}</div>
</Fragment>
)
}
}
}

0 comments on commit a24e397

Please sign in to comment.