Skip to content

Commit

Permalink
Merge pull request #3049 from patzick/bugfix/#2888-SSR-problem-on-pro…
Browse files Browse the repository at this point in the history
…duct-page-with-logged-in-user

Bugfix/#2888 ssr problem on product page with logged in user
  • Loading branch information
pkarw committed Jun 12, 2019
2 parents b50704f + f3ca926 commit 19c05d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix sortBy for the category page - @Jensderond (#2868)
- Fixed incorrect prices in Instant Checkout (PR API) - @qiqqq (#2874)
- Incorrect `user_id` set on the order object - @pkarw (#2966)
- Problem with SSR render on product page with logged in user - @patzick (#2888)

### Changed / Improved
- The action `cart/userAfterLoggedin` got renamed to `cart/authorize` - @pkarw (#2522)
Expand Down
19 changes: 12 additions & 7 deletions src/themes/default/components/core/blocks/Reviews/Reviews.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@
>
{{ $t('Add review') }}
</button-full>
<span
class="fs-medium ml20 cl-gray lh30 py5 block"
v-if="!currentUser"
>
{{ $t('or') }} <a href="#" class="cl-primary" @click.prevent="login()">{{ $t('login') }}</a> {{ $t('to account') }}
</span>
<no-ssr>
<span
class="fs-medium ml20 cl-gray lh30 py5 block"
v-if="!currentUser"
>
{{ $t('or') }} <a href="#" class="cl-primary" @click.prevent="login()">{{ $t('login') }}</a> {{ $t('to account') }}
</span>
</no-ssr>
</div>
</form>
</div>
Expand All @@ -107,6 +109,8 @@ import ButtonFull from 'theme/components/theme/ButtonFull'
import ReviewsList from 'theme/components/theme/blocks/Reviews/ReviewsList'
import { Reviews } from '@vue-storefront/core/modules/review/components/Reviews'
import { AddReview } from '@vue-storefront/core/modules/review/components/AddReview'
import NoSSR from 'vue-no-ssr'
export default {
name: 'Reviews',
data () {
Expand Down Expand Up @@ -205,7 +209,8 @@ export default {
ButtonFull,
BaseInput,
BaseTextarea,
ReviewsList
ReviewsList,
'no-ssr': NoSSR
}
}
</script>

0 comments on commit 19c05d7

Please sign in to comment.