Skip to content

Commit

Permalink
fix vuestorefront#2888 - user is fetched after render, cannot be SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
patzick committed Jun 12, 2019
1 parent 1c8a73a commit 31aa19c
Showing 1 changed file with 12 additions and 7 deletions.
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 31aa19c

Please sign in to comment.